Forum    Search    FAQ

Board index » Chat Forums » General Chat




Post new topic  Reply to topic  [ 12 posts ] 
 
Author Message
 Post Posted: Tue Feb 11, 2014 7:03 pm 
Offline
Joined: Fri Dec 06, 2013 6:27 pm
Posts: 40
Location: ehm... <location updated, thank you!>
I created this nifty user script for greasemonkey (a firefox addon).
Basically it adds a sixth button on the comic nav bar, linking directly to current strip's reaction page on the forum, because life is short, and laziness is source of innovation!

I uploaded the script, so now you can grab it here: https://openuserjs.org/scripts/agentofchaos/inflatable_switchblade
And one-click install it in your browser.

Basically the script recreates the current comic's date from the url, and feeds it to a custom "search engine", which looks for that date in the forum's reaction posts overview. The search is optimized attempting to find a pivot page (close enought to the target) on the thread list, and then spirally searching for the target from there.
Needless to say the script is extra bleeding edge, and in need of testers! :kzk:
Feel free to copy share and improve. I might add it to my github, if I'll remember to do it.
Tested working on Firefox 27.0, Arch Linux


Last edited by agentOfChaos on Sun May 25, 2014 2:05 pm, edited 2 times in total.
Top 
   
 Post Posted: Wed Feb 12, 2014 10:07 am 
Offline
Joined: Fri Dec 06, 2013 6:27 pm
Posts: 40
Location: ehm... <location updated, thank you!>
Update! Now it uses regular expression to match results.

Top 
   
 Post Posted: Sat Feb 15, 2014 7:38 am 
Offline
Joined: Fri Dec 06, 2013 6:27 pm
Posts: 40
Location: ehm... <location updated, thank you!>
Update! Improved reg exp matching, added userscripts.org link, removed code snippet.

Top 
   
 Post Posted: Wed Mar 19, 2014 4:45 am 
Offline
Joined: Fri Dec 06, 2013 6:27 pm
Posts: 40
Location: ehm... <location updated, thank you!>
Update! Added "Vote for sluggy" button.

Top 
   
 Post Posted: Wed Mar 19, 2014 1:45 pm 
Member of the Fraternal Order of the Emergency Pants
User avatar
Offline
Joined: Mon Dec 15, 2003 12:00 am
Posts: 2993
This is pretty awesome!

Top 
   
 Post Posted: Sun May 25, 2014 2:07 pm 
Offline
Joined: Fri Dec 06, 2013 6:27 pm
Posts: 40
Location: ehm... <location updated, thank you!>
Userscripts.com seems to be down.
I re-uploaded the script and changed the link accordingly: https://openuserjs.org/scripts/agentofchaos/inflatable_switchblade

Top 
   
 Post Posted: Fri Jun 06, 2014 12:09 pm 
Offline
Joined: Fri Dec 06, 2013 6:27 pm
Posts: 40
Location: ehm... <location updated, thank you!>
Update: I added a feature to visualize the ref-linked comic in the reddish space below, just click on the link to show/hide.
It supports even nested ref-links!

Top 
   
 Post Posted: Wed Jul 16, 2014 1:20 am 
User avatar
Offline
Joined: Tue Jun 03, 2014 5:44 am
Posts: 1101
If you're thinking about new updates still...

When it gets to midnight, have it check to see when the latest comic is uploaded (as Pete is often late!). That's something I'd install!

i.e., every minute after midnight, fetch the html page and check for a new filename.jpg until Pete updates the site. Once found, alert the user or automatically open the main page in a new browser window :) The main page is pretty static so this would be easy to implement.

Top 
   
 Post Posted: Sun Aug 31, 2014 2:11 pm 
Offline
Joined: Fri Dec 06, 2013 6:27 pm
Posts: 40
Location: ehm... <location updated, thank you!>
Updated!
1) Fixed some issues that emerged recently (the reaction page locator wasn't "locating" anymore).
2) Added the "check-updates" subsystem: at the current state of developement, it always checks for updates every 8 seconds, using the http "last modified" header, just like RSS does, except that, for some reasons, firefox won't let me do a proper conditional http request, I'll figure how later.
PS. the updater triggers only on the main page (not while archive trawling).

Top 
   
 Post Posted: Sun Aug 31, 2014 5:26 pm 
Offline
Joined: Fri Dec 06, 2013 6:27 pm
Posts: 40
Location: ehm... <location updated, thank you!>
Quick update: now the script will start looking for updates only after midnight (using the server's clock as reference).
EDIT: almost wasted a perfect occasion for a "Gremlins" joke here!
Aren't all hours technically "after" midnight (00:00)? :bunbun:

Top 
   
 Post Posted: Mon Sep 01, 2014 3:21 am 
Member of the Fraternal Order of the Emergency Pants
User avatar
Offline
Joined: Wed Feb 26, 2003 12:00 am
Posts: 2777
AOL: Dodger724
Location: Relative Obscurity
agentOfChaos wrote:
Aren't all hours technically "after" midnight (00:00)? :bunbun:
Haha, that's something I always wondered as well. When is OK to feed them? After sunrise?

Top 
   
 Post Posted: Tue Jan 13, 2015 4:56 am 
Offline
Joined: Fri Jan 09, 2015 9:22 am
Posts: 9
I was just thinking I should do this last night! Nice to know someone's already beaten me to the punch :)

Top 
   
Display posts from previous:  Sort by  
 
Post new topic  Reply to topic  [ 12 posts ] 

Board index » Chat Forums » General Chat


Who is online

Users browsing this forum: Google [Bot] and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: