DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Some DC forum-related Greasemonkey Scripts  (Read 9,910 times)

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • Plugin Coding Medal
    • Participated in NANY Challenge Three Times
Some DC forum-related Greasemonkey Scripts
« on: April 04, 2009, 08:54 AM »
I've put together a page with links to some DC forum-related Greasemonkey scripts.

At the moment, what's available is:

  • Script to change color of dates in certain DC forum posts and topics by age
  • Script to ease opening of unread DC forum topics in tabs

The former script requires that the date format for your user is set up to be of the form YYYY-MM-DD -- if people are interested in other formats being supported, please mention the formats and I will at least give them some consideration.  Also, it doesn't work for all pages that list topics -- if there's some page that isn't which you'd like, please give me a sample URL and I'll consider investigating feasibility.

post-date-colored.png

topic-date-colored.png

The latter script is what I've started using to make viewing unread topics a little easier -- after installation some menu items are added to the Greasemonkey "User Script Commands" submenu.  Some items are for opening some number of unread topics in tabs while one is for opening just the unread topics which have their checkboxen checked.  I haven't gotten the accelerator key functionality working locally for some reason...

For sanity's sake, the script will ask for confirmation if it is asked to open more than 3 tabs at once -- and the tab opening should now be staggered by 1 second each.  The original page listing the unread topics should also get reloaded 1 second after the last tab is opened.

gm-statusbar-item-menu.png
« Last Edit: April 05, 2009, 02:24 PM by ewemoa »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Some DC forum-related Greasemonkey Scripts
« Reply #1 on: April 04, 2009, 09:04 AM »
cool -- thanks for sharing!  :up:

housetier

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 1,321
    • Gathering Badge
Re: Some DC forum-related Greasemonkey Scripts
« Reply #2 on: April 05, 2009, 01:46 PM »
Oi! This is great!  :Thmbsup: :Thmbsup:

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • Plugin Coding Medal
    • Participated in NANY Challenge Three Times
Re: Some DC forum-related Greasemonkey Scripts
« Reply #3 on: April 05, 2009, 02:22 PM »
Thanks for the feedback, mouser and houstier :)

Hope the scripts turn out to be useful -- perhaps some portions can evolve into an FF extension some day...

BTW, I just uploaded an updated version of the opening unread in tabs script.  The description in the OP has been updated accordingly -- the main changes have to do with confirming when more than 3 tabs are requested to be opened at once, spreading out the opening of the tabs over time (kindness toward client and server), and reloading of the page with the unread topics listing.
« Last Edit: April 05, 2009, 02:27 PM by ewemoa »

4wd

  • Pedantic Old Bastard
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,652
    • Coding Snacks
Re: Some DC forum-related Greasemonkey Scripts
« Reply #4 on: April 05, 2009, 11:44 PM »
I've put together a page with links to some DC forum-related Greasemonkey scripts.

At the moment, what's available is:

  • Script to change color of dates in certain DC forum posts and topics by age

For some reason the above script only partially works here.  It's my understanding that it should work across all the forum lists but for some reason it seems to only work for the examples you have within the script and for topic replies.

For example:

http://www.donationcoder.com/forum/index.php?board=2.3640          All topic dates are black as per image.

capture_04062009_093858.jpg

If I choose a topic:

http://www.donationcoder.com/forum/index.php?topic=2063.0           The replies get the age coloured dates as they should.

capture_04062009_093911.jpg

It seems obvious to me that this is all mouser's fault1, it's his forum  :P

EDIT: OK, it says "certain" DC forum posts/replies - what exactly does that mean?

Disclaimer: If it turns out to be my computer, then it's still mouser's fault - his forum did something to it!!!
"I will not follow where the path may lead, but I will go where there is no path, and I will leave a trail." - Muriel Strode, 1903
« Last Edit: April 05, 2009, 11:46 PM by 4wd »

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • Plugin Coding Medal
    • Participated in NANY Challenge Three Times
Re: Some DC forum-related Greasemonkey Scripts
« Reply #5 on: April 10, 2009, 06:55 AM »
Sorry for not responding sooner.

The way the script currently works is by picking out portions of various pages using XPath expressions.  It turns out that the various pages on the forums are...well, varied in structure ;)  I didn't manage to come up with a single XPath expression (or a few) to handle all cases, so at the moment, it's pretty much a matter of adding support for additional page "types" piece-meal.

I don't know if mouser would be amenable to the following idea, but it occurs to me that if the forum templates were tweaked a bit (e.g. adding attributes to particular elements) it might make the scripts job easier, faster, and more comprehensive :)
« Last Edit: April 10, 2009, 06:58 AM by ewemoa »

4wd

  • Pedantic Old Bastard
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,652
    • Coding Snacks
Re: Some DC forum-related Greasemonkey Scripts
« Reply #6 on: April 10, 2009, 12:12 PM »
Sorry for not responding sooner.

No problem, faster than I usually take to answer an email :D

Quote
The way the script currently works is by picking out portions of various pages using XPath expressions.  It turns out that the various pages on the forums are...well, varied in structure ;)  I didn't manage to come up with a single XPath expression (or a few) to handle all cases, so at the moment, it's pretty much a matter of adding support for additional page "types" piece-meal.

I thought it was pretty much that way and looked into fiddling with it to get it to 'work across the board'......until I saw that the forum pages weren't very consistent  ;D
"I will not follow where the path may lead, but I will go where there is no path, and I will leave a trail." - Muriel Strode, 1903

Original address: https://www.donationcoder.com/forum/index.php?topic=17772.0