[x]

deviantART

 




// ==UserScript==
// @name           deviantART Go to Last Page of Topic
// @namespace      http://davidjcobb.deviantart.com
// @description    Adds a "Last Page" link to topics in deviantART's forums.
// @include        http://forum.deviantart.com/*/*/
// ==/UserScript==


unsafeWindow.FFGM_DJC_DA_GoThroughForumTable = window.FFGM_DJC_DA_GoThroughForumTable = function() {
   for (var i=0;i<document.getElementsByTagName("table").length;i++) {
      if (document.getElementsByTagName("table")[i].className=="forum f full") {
         for (var a=1;a<document.getElementsByTagName("table")[i].rows.length;a++) {
            if (document.getElementsByTagName("table")[i].rows[a].cells.length==1) continue;
            var URL=document.getElementsByTagName("table")[i].rows[a].cells[1].childNodes[1].href;
            var postCount=document.getElementsByTagName("table")[i].rows[a].cells[3].childNodes[0].nodeValue.replace(/s/gi,"");
            var lastPageOffset=parseInt(postCount)-(parseInt(postCount) % 25);
            var lastURL=URL+"?offset="+lastPageOffset;
            var A=document.createElement("A");
            A.innerHTML=postCount;
            A.href=lastURL;
            document.getElementsByTagName("table")[i].rows[a].cells[3].replaceChild(A,document.getElementsByTagName("table")[i].rows[a].cells[3].childNodes[0]);
         }
         break;
      }
   }
}
FFGM_DJC_DA_GoThroughForumTable();
Creative Commons License
Some rights reserved. This work is licensed under a
Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 License.
Details
Submitted: May 23, 2008
File Size: 2.5 KB
Image Size: 1.6 KB
Resolution: 150×150
Comments: 8
Favourites & Collections: 2 [who?]

Views
Total: 262
Today: 0

Downloads
Total: 23
Today: 0

Thumb

Author's Comments

Go To Last Page
Click here to download this userscript from Userscripts.org.


Turns the Replies number into a link to the last forum page.
Because the topic uses numbers of posts as offsets instead of page numbers, this script won't work so well if you have your account set to show more than 25 posts per page.

Important Update 6/6/2009
A bug was fixed; see this script's page at Userscripts.org for more information.
[x]

Devious Comments

love 0 0 joy 0 0 wow 0 0 mad 0 0 sad 0 0 fear 0 0 neutral 0 0

Comments


Yes, I wanted to add this to my Jump to page script, because it is often asked.
The setting of the number of messages per page is the tripping point, indeed, I thought I could store it from previous browsing...

--
82% of statistics in signatures are made up. :rip: (This is a recursive signature...)
Spreading them is un-original and sheepish. If you agree, copy this in your... wait, no! :D
No to signature clichés! You are on an art site, be creative!
How do I install this? :eager:

I've no idea how to. :blushes:

--
:snowflake::snowflake::snowflake:
:snowflake::rose::snowflake:
:snowflake::snowflake::snowflake:
You can install it from Userscripts.org.

I'd put the link on the Deviation, but deviantART's file upload script is so ridiculously fragile (and unfit for release!) that any add-on breaks it, and I really don't feel like going through all of my add-ons one by one, so I can't edit the Deviation at all.

--
тнє פuїпєα ρїפѕ αгє гїѕїпפ...
I installed it. It seems to be working, even though I view 100 replies per page. Thanks. :cuddle:

--
:snowflake::snowflake::snowflake:
:snowflake::rose::snowflake:
:snowflake::snowflake::snowflake:
Hi, I tried installing this script. But all I got when I pressed install was this. [link] I was wondering if you could help me.

--
Philosophy Nerd:heart:
You're welcome :D

--
тнє פuїпєα ρїפѕ αгє гїѕїпפ...
Sorry... Click here for installation instructions.

--
тнє פuїпєα ρїפѕ αгє гїѕїпפ...

Site Map