topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 2:17 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Some DC forum-related Greasemonkey Scripts  (Read 7177 times)

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Some DC forum-related Greasemonkey Scripts
« on: April 04, 2009, 03: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.pngSome DC forum-related Greasemonkey Scripts

topic-date-colored.pngSome DC forum-related Greasemonkey Scripts

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.pngSome DC forum-related Greasemonkey Scripts
« Last Edit: April 05, 2009, 09:24 AM by ewemoa »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Some DC forum-related Greasemonkey Scripts
« Reply #1 on: April 04, 2009, 04:04 AM »
cool -- thanks for sharing!  :up:

housetier

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 1,321
    • View Profile
    • Donate to Member
Re: Some DC forum-related Greasemonkey Scripts
« Reply #2 on: April 05, 2009, 08:46 AM »
Oi! This is great!  :Thmbsup: :Thmbsup:

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Some DC forum-related Greasemonkey Scripts
« Reply #3 on: April 05, 2009, 09:22 AM »
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, 09:27 AM by ewemoa »

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,641
    • View Profile
    • Donate to Member
Re: Some DC forum-related Greasemonkey Scripts
« Reply #4 on: April 05, 2009, 06: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:

https://www.donation...dex.php?board=2.3640          All topic dates are black as per image.

capture_04062009_093858.jpgSome DC forum-related Greasemonkey Scripts

If I choose a topic:

https://www.donation...dex.php?topic=2063.0           The replies get the age coloured dates as they should.

capture_04062009_093911.jpgSome DC forum-related Greasemonkey Scripts

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!!!
« Last Edit: April 05, 2009, 06:46 PM by 4wd »

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Some DC forum-related Greasemonkey Scripts
« Reply #5 on: April 10, 2009, 01: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, 01:58 AM by ewemoa »

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,641
    • View Profile
    • Donate to Member
Re: Some DC forum-related Greasemonkey Scripts
« Reply #6 on: April 10, 2009, 07:12 AM »
Sorry for not responding sooner.

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

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