Greasemonkey script for HBH - thread lookback
Hey. I know I'm not well known around here, but I figured you people may be equally annoyed about one thing on these forums as me, that is that when you're replying to a post you cannot see the thread so if you want to read back to others' posts you've got to have the thread in one tab and the reply in another tab, very annoying. I decided to fix it and created a greasemonkey extension to solve it. Here's how it works:
When you're on a http://www.hellboundhackers.org/fusion_forum/post.php?* page (note the wildcard), it'll load the thread via AJAX, get rid of all the crap like the side bars, banner, footer etc and shove the output below the reply form on the page.
To use the script yourself install the greasemonkey extension, then as with all extensions reboot firefox. Then go to the script, press the install button that greasemonkey will show for you. Then just press the reply button to any forum post and watch the magic.
Here's a screenshot, click it for a bigger pic.
Things you may be worried about: Isn't this a new XSS vector for people to use on me? No, if the code gets executed here then it would have been executed when you read the thread anyway, it has exactly the same security as you already had as it's just showing the previous page again. Will I have to wait for this script to load the page before I can start replying? No, this script uses asynchronous AJAX which means that it simply shows some text initially showing you that it's loading. You can write your post away during this time, in a few seconds you should see the thread appear. There will be a minimal time required for the JS to run, but that really is minimal. Will this work on every theme? I tested the default one and the one I use (sunset), both work perfectly.
Edit 20/07/07: Works with "new" forums
You're right, it is rather annoying, but seeing as I don't post here very much anyways I don't mind it all that much. I think that's a good idea though and am surprised you would take time out of your schedule to create something like this :p, but it's nice to know at least some of us our productive in our personal studies.;)
It didn't take long… .I'll just check when the file was created… Created: 03 September 2006, 05:31:51 Last edited: 03 September 2006, 06:29:58 That's how long it took to make (while doing other stuff, like chatting away on the IRC), and yes, I am having problems sleeping.
I just get a warm fuzzy feeling when my stuff is used by others :)
What about it doesn't work? Does the script load into greasemonkey? To find out go to tools > manage user scripts and see if it's there. Does it cause a JS error? (check the JS console) Does it get stuck at the loading phase, if so you could try running wireshark (was ethereal) and see what is messing up with the request.
Do you have the http://example.comtp://example.com and http://www.example.com are different as far as your browser cares. I just updated the code to also work without the www, just re-install the script and it'll replace the existing one, or just add the url yourself via the greasemonkey manager.
Edit: found a bug, it causes a JS error when I try to edit a post. I don't know if I can be bothered to fix this right now.
Edit: Who am I kidding, of course I was going to fix those bugs. I've again updated the file, now works when you're posting and editing.