2

Alright, I will try to make this is as simple as possible, without being too vague. I want to change one of line of code on a webpage in hopes of preventing a preview pane from appearing.

Original line of code

<div id="previewpane" class="previewpane" sytle="height: 139px;">

I want to replace the above line with

<div id="previewpane" class="previewpane previewpane-hide" style="height:139px;">

I have previously written one Greasemonkey script but unfortunately I am have having difficulty applying the techniques learned from that script into this new one, thus this post.

cheers
-Chris

ipatch
  • 3,933
  • 8
  • 60
  • 99
  • You could probably use [Stylish](https://addons.mozilla.org/en-US/firefox/addon/stylish/) to achieve the same effect. I think the CSS would be `#previewpane { display: none !important; }` assuming that the previewpane-hide class does what I assume it does... – Tyler Apr 15 '11 at 01:01
  • @MatrixFrog: You're right. Stylish would be better for accomplishing the OP's stated page-change. I suspect there may be more going on, though. – Brock Adams Apr 15 '11 at 01:32

1 Answers1

1

That's pretty easy. Here's a complete script that should work (change the include line).

// ==UserScript==
// @name            Easy Page tweaker
// @description     Hides pane?
// @include         http://stackoverflow.com/*
// @require         http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js
// ==/UserScript==

$("#previewpane").addClass ("previewpane-hide");
Brock Adams
  • 90,639
  • 22
  • 233
  • 295