HOME | DD

philho — Jump to page v1.1

Published: 2007-12-20 12:57:12 +0000 UTC; Views: 3510; Favourites: 28; Downloads: 129
Redirect to original
Description Quick facts:

What is it? A Greasemonkey (GM) script for Firefox (FF) to allow jumping to an arbitrary page whenever there is a Previous Page or Next Page link.

History
v.1.1 - 2007/12/22 - Added improvements made by BoffinbraiN (not shown in the screenshots), deactivated on the Today page.
v.1.0 - 2007/12/04 - Creation.

How to use

See my Information on Greasemonkey scripts journal entry for all needed information!

For fast, easier installation, you can go to the UserScripts.org page.

More infos:

In the suggestion forum, I see very often requests to help jumping to any page in a thread or list of comments in deviations or journals. Apparently, dA did the reverse, removing the (quite useless anyway) small list of page numbers from the navigation box (the one with the Previous Page / Next Page links).
Apparently, few deviants has noticed that the ?offset=xxx field in the URL of dA pages can be tweaked in the address bar of the browser to jump to an arbitrary page. And since it tells to skip a number of messages, it might need some maths depending on the page size.
So I had the idea to write a little Greasemonkey script to help automating this. The base was quite easy, because dA is quite consistent on the interface, but I found myself tweaking it a lot to adapt to different page sizes and some other peculiarities.

So, what do my script does? The screenshots say it all: it adds either a combobox (if number of comments is known) or an edit field (otherwise) to the navigation box (with Previous Page / Next Page links, and sometime a limited array of page numbers) to allow jumping at an arbitrary page number in forum threads, deviation/journal/news/etc. comments, list of watchers or deviants having faved a deviation, search pages, browse category, gallery, favourites and so on.

See the screenshots to see how it looks. If there is only one page, or if the script knows there is only two pages, it changes nothing.

The script takes the number of comments out of deviation or news or search result pages, and so is able to display a combo box with the list of pages you can jump to.
Otherwise, it provides an edit field where you can type a page number: if you chose to have a Go button (see the line below the one starting with //$$), you can click on it to jump to the given page. Otherwise (in both cases actually), just hit Return to do the jump.
If you typed a number too big, past the last page, dA won't puke but it will often display a page stating "No Comments Here" or similar... and no navigation box! Just hit Back button to try again.

You can also type a negative message number (eg. -1427), the script will jump to the page containing this message. It is convenient to jump to the last page of comments when you know
the number of comments: it is often displayed in the page before the page of comments, I show it for forums and journals in the screenshot.

I have tested it in several parts of deviantART, and thanks to some consistency in design, it might works on unknown/news parts. Otherwise, just report the problem to me with the URL where you saw the
issue, and I will try and correct this.
Related content
Comments: 27

KishiFishy [2008-09-27 06:20:18 +0000 UTC]

If only this worked with V6, I'd totally use it. 8D

👍: 0 ⏩: 1

philho In reply to KishiFishy [2008-09-27 10:16:47 +0000 UTC]

Well, I fear I am not overly motivated to re-work on it, currently. Even less as lot of real links became JavaScript jumps...
I expected that v.6 would bring a better navigation system for lot of pages, but alas they discarded the idea as it seems.

👍: 0 ⏩: 1

KishiFishy In reply to philho [2008-09-27 10:57:27 +0000 UTC]

Aw! .____.

Haha you type formal. >u>

👍: 0 ⏩: 0

Stephr0x0rs [2008-08-11 10:11:53 +0000 UTC]

"Fucking awesome, man! You totally owned dA staff by implementing a feature that they have failed to deliver for a whole year - yet would take only a day to write."

OMG I totally agree, I mean, what were they thinking?? Browsing the galleries I don't even have a clue what page I'm on, out of who knows how many, same with comments.

Although, I can't seem to get this to work. Firefox 3.0.1. It's only display the textbox style, doesn't show how many pages, and when I try to go to a certain page, I get a "Error loading content" message.

👍: 0 ⏩: 1

philho In reply to Stephr0x0rs [2008-08-16 08:15:49 +0000 UTC]

Ah. This script is a mess...
I planned to rewrite it, but have still to do it. It is a collection of exceptions, depending on the page we are on: news, deviation, forum thread, journal, etc. I wrote it for v.5, coding as I navigated, but lot of features have changed with v.6, and dA switched lot of "classical" pages (with changing URL) to JavaScript paging (eg. in galleries).
I keep it because it half works in some places, but I should put a big warning, and update it someday.

👍: 0 ⏩: 0

ellastasia [2008-02-05 07:31:56 +0000 UTC]

genius!

👍: 0 ⏩: 1

philho In reply to ellastasia [2008-02-05 08:04:41 +0000 UTC]

👍: 0 ⏩: 0

Asphyziata [2008-01-19 17:55:08 +0000 UTC]

Thanks for the script <3

👍: 0 ⏩: 1

philho In reply to Asphyziata [2008-01-19 18:25:22 +0000 UTC]

You are welcome. I am glad people find it useful!

👍: 0 ⏩: 0

Leo-Garth [2007-12-26 17:16:16 +0000 UTC]

It doesn't work!!!

👍: 0 ⏩: 1

Leo-Garth In reply to Leo-Garth [2007-12-26 17:54:34 +0000 UTC]

Nevermind, it just happened to be a broken script every time I downloaded it about five times in a row.

I guess 6th time's the charm

👍: 0 ⏩: 0

BoffinBrain [2007-12-23 02:30:15 +0000 UTC]

Warning: the script breaks the navigation links on the Daily Deviations pages.

👍: 0 ⏩: 1

philho In reply to BoffinBrain [2007-12-23 09:48:40 +0000 UTC]

Thanks. I just deactivated it there...

👍: 0 ⏩: 0

Solitude12 [2007-12-22 20:22:23 +0000 UTC]

Awesome! D:

👍: 0 ⏩: 1

philho In reply to Solitude12 [2007-12-22 20:23:05 +0000 UTC]

Thanks!

👍: 0 ⏩: 0

BoffinBrain [2007-12-22 11:21:03 +0000 UTC]

Fucking awesome, man! You totally owned dA staff by implementing a feature that they have failed to deliver for a whole year - yet would take only a day to write.

I've improved the style of your inputs as they originally had too much space around them and didn't line up with the links. I've also placed the page number INTO the text box so that you don't need the "(p x)" text. See it here.

👍: 0 ⏩: 1

philho In reply to BoffinBrain [2007-12-22 11:40:55 +0000 UTC]

Yes, I didn't spend much time on improving the look, I concentrated more on the functionality... So improvements are welcome. Although your link has no href field...
I am not sure about putting the page number in the text box, as one has to remove it before typing another one. But I can make it optional.

👍: 0 ⏩: 1

BoffinBrain In reply to philho [2007-12-22 12:02:37 +0000 UTC]

[link] I've added an event listener so when the user clicks or otherwise focuses on the text box, it selects the text, meaning any keypress will replace the contents.

👍: 0 ⏩: 1

philho In reply to BoffinBrain [2007-12-22 13:12:56 +0000 UTC]

Many thanks. I will test a bit your improvements, then update this deviation.
I am often reluctant of such event listeners as I found some misused ("delete field content upon focus gain", great when you quit a message field to copy something and come back to paste it...) but you do only a select, which is fine, and it is less annoying in such simple field anyway.

👍: 0 ⏩: 1

BoffinBrain In reply to philho [2007-12-22 14:30:26 +0000 UTC]

Yes, I have learnt that from other web designers' past mistakes. Select-on-focus is a well-accepted and accessible behaviour. So, apart from the two lines of style attributes, that's all I changed.

👍: 0 ⏩: 0

Pererix [2007-12-20 20:51:26 +0000 UTC]

yay!
looks good..
would be awesome if we can get that on..

👍: 0 ⏩: 1

philho In reply to Pererix [2007-12-20 21:01:46 +0000 UTC]

Ah, personally I wouldn't mind to see my scripts obsoleted by a new feature of dA... If they can inspire them...

👍: 0 ⏩: 0

kevinqagoncillo [2007-12-20 19:42:51 +0000 UTC]

Nice! I'm gonna LOVE this feature!

👍: 0 ⏩: 1

philho In reply to kevinqagoncillo [2007-12-20 20:53:29 +0000 UTC]

Yes, I fear this script will become popular, given the number of requests for such feature in the suggestion forum... Although dA would make the feature better, since they always know the total number of pages...

👍: 0 ⏩: 1

kevinqagoncillo In reply to philho [2007-12-21 07:53:08 +0000 UTC]

Oh my goodness

this was a feature I requested myself ^_^

👍: 0 ⏩: 0

fairytalesdontexist [2007-12-20 13:24:05 +0000 UTC]

working fine, thanks!

👍: 0 ⏩: 1

philho In reply to fairytalesdontexist [2007-12-20 14:20:26 +0000 UTC]

👍: 0 ⏩: 0