Forum Post: Fighting back - how to expand all collapsed comments using Firebug & Firefox
Posted 12 years ago on May 22, 2012, 2:15 p.m. EST by XenuLives
(1645)
from Charlotte, NC
This content is user submitted and not an official statement
Sorry this is a little late... but not bad info to have for next time, right?
It sucks when a bot comes through here and censors all of our comments through a flurry of down votes. Using Firefox and Firebug, you can modify a line of this site's styling code to make all of those comments instantly re-appear.
Follow these steps to un-collapse all comments:
Get Firefox (http://www.mozilla.org/en-US/firefox/new/)
Get & install Firebug (add-on for Firefox) (http://getfirebug.com/)
Load any thread on the forums
On the top right corner of your Firefox window there should be a Firebug icon. Click that and you should see a window appear on the bottom of your browser's window.
Click on "CSS." You should see the code for one of the site's CSS files appear.
There will be a bar that shows the name of the file that you are viewing. Hover over that and click on the arrow to get a list of CSS files. Choose occupywallst.css?v=41. This is the main CSS file for the forums.
Next to where you switched files you should see a button called "Source Edit" click on that and switch it to "Live Edit."
Hit Ctrl + F. In the search box that appears, type ".collapsed" Your code window should jump to the CSS classes named "collapsed."
See the line in each of these classes where display: none? Hover over them, and you should see a disable icon appear in grey. Click on that to disable the display: none line in the code.
Voila! No more hidden comments. You'll have to repeat this for each thread that you visit, but you can keep Firebug open for quick access to this fix.
seems like a lot of trouble when all you have to do is click on the little plus or minus sign and accomplish the same thing
Update on the GreaseMonkey solution: Once you get GreaseMonkey installed, you have to configure it to use a text editor before you can add your own scripts. To do this:
click on the arrow next to the Greasemonkey icon in your browser, then go to Greasemonkey Options > Select Script Editor.
From there navigate to the .exe file for the text editor that you want to use (BTW, Notepad [installed on all Windows machines] can be found @ C:\Windows\Notepad.exe)
Then go through the steps to add a script to GreaseMonkey, and now you should be taken to Notepad or your selected text editor instead of a dialog box looking for a .exe file.
Here's a GreaseMonkey script that you can install to automatically uncollapse all comments:
// ==UserScript== // @name occupywallst uncollapser // @namespace occupywallst_uncollapser // @description Uncollapses all comments for http://occupywallst.org/forum/ // @include http://occupywallst.org/forum/* // ==/UserScript==
// ** // Shows the child with the given className // // @param object parent element // @param string class // @return void // *
function showChild(parent, className) { var child = parent.getElementsByClassName(className); child[0].style.display = 'block'; }
// ** // Runs the script after the DOM is loaded // * window.addEventListener("load", function(e) { var e = document.getElementsByClassName('collapsed'); for (var i=0; i<e.length; i++) { showChild(e[i], 'words'); showChild(e[i], 'links'); } }, false);
EDIT: So indentations don't display on the forums... PM me if you need a better formatted version of this, although it will not hurt to just paste this code as-is into your text editor.
I got a message containing another useful tip via GaryAutumn:
"Here's an example of a modification I made to ignore certain users: http://occupywallst.org/forum/a-short-javascript-to-ignore-user-postings-and-art/
You could easily add your code to uncollapse comments in there. (it's the opposite of what I'm doing which is collapsing)."
You can follow these instructions to create a custom "ignore list" for whomever is trolling you. Sweet!