To Think About . . .

It’s not whether you win or lose, it’s how you place the blame. Oscar Wilde

 

 

 

My Latest Book

Product Details

Also available on Amazon.com, Amazon.fr, and other Amazons and bookshops worldwide! 

Search This Site
Log-in
Latest Comments
My Other Books

Product Details

Product Details

Product Details

The Pathway to Awesomeness

Click to order other recommended books.

Find Us on Facebook Badge

Discussion Forum > Greasemonky script for this forum

Hello everyone,

I wrote a really small script to deal with something that was annoying me when using the forum. As you may know, I use the Firefox addon "SiteDelta" to keep track of what's happening in the forum.

Every discussion thread has a number and its address looks like this:

/forum/post/866846

That is the address you reach if you click on a link in the main forum page. And if you add this address to SiteDelta, you'll be informed about new replies to it. Until ...

... the post count reaches 50. Then a new page is created, and from the first page you first need to scroll down and click on the link to the second page to get there.

The second page has a new address:

/forum/post/866846?currentPage=2

Since the address changed, SiteDelta, which is still watching /forum/post/866846, will not report new replies anymore. I can add the new address again, but I have to do that for every discussion everytime it reaches a new page.

The solution is to use another address, that looks this:

/forum/post/866846?lastPage=true

This will always get you to the last page. If there is one page, you'll end up on page 1. If there are two pages, you'll be on page 2. And so on.

So if you watch this page, you'll always be informed of new replies. Now I could just add "?lastPage=true" manually everytime I add a discussion to my watchlist, but that's where my script comes in.

The script changes the links on the main forum page so you always get to the last page of a discussion. It's great if you use SiteDelta, but I think you may benefit from it even if you browse the forum manually since it saves you the trouble to go through the pages.

You can add the script to Greasemonkey from here: http://autofocus.cc/public/data/greasemonkey/markforsternet_forum_lastpage.user.js
August 26, 2009 at 9:53 | Unregistered CommenterAndreas Hofmann
Nice, works also with Opera (I never tried Greasemonkey scripts before this one)
August 26, 2009 at 12:52 | Unregistered CommenterDamien
It doesn't seem to work as advertised for me. Suggestions? Grease Monkey is enabled and so is the script. But it doesn't show up when I right click on the GreaseMonkey icon. Do I need to do anything else to get it running?
August 26, 2009 at 16:09 | Unregistered CommenterMartyH
MartyH:

No, you shouldn't need anything beside Greasemonkey. Are you using NoScript or something else that may block Javascript?
August 26, 2009 at 20:10 | Unregistered CommenterAndreas Hofmann
I think it is working fine now. I had to add an asterisk at the end of the "included pages" for the script so it now reads: http://www.markforster.net/forum*
August 27, 2009 at 0:35 | Unregistered CommenterMartyH
The asterisk shouldn't be necessary. The script is supposed to work on the address http://www.markforster.net/forum only, not on the subpages of the forum. All it does is change the links on the main forum page to point to the last page of each discussion. I'm have not tested what it effects if it's enabled for subpages. But if it's working fine for you, then I guess everything is alright. :-)
August 27, 2009 at 9:17 | Unregistered CommenterAndreas Hofmann
Ah, I see the problem now. There are two addresses in use for the forum main page. Depending on how you reach it, it's either http://markforster.net/forum OR http://markforster.net/forum/ - with trailing slash.

So the script should be enabled for
http://markforster.net/forum
http://markforster.net/forum/

http://markforster.net/forum* is too much, but probably okay. It could be that you can't access earlier pages of a discussion when you include the asterisk. Have you tried?

I'll change the script on the server to include both addresses.
August 27, 2009 at 9:20 | Unregistered CommenterAndreas Hofmann
Thanks! You were right; I couldn't access earlier pages. When I include both urls as you suggest, it works fine.
August 28, 2009 at 3:02 | Unregistered CommenterMartyH
I have a new installation of Firefox at work, loaded this script, but the color coding, tick boxes, etc are not working.

I have enabled the script for http://markforster.squarespace.com/forum and http://markforster.squarespace.com/forum/ but no joy.

Any clues?
September 10, 2014 at 15:21 | Registered CommenterMike Brown
Mike:

I have found this sometimes happens with new versions of FF but seems to resolve itself after a couple of days. Hugo Ferreira suggested in this thread: markforster.squarespace.com/forum/post/1671341 that clearing the browser cache or restarting might help. Didn't work for me but you could give it a try.
September 15, 2014 at 1:54 | Registered CommenterLachlan Black