Banner
Views: 700,608,023
Time:
11 users online: Flippn'Fences, glitch4, Major Flare, MasterMario97, OrangeRock57, PaulN7687, Puduhge, RAFAEL_M_C_, Rykon-V73, Superunknown089, SuperYoshi SMW - Guests: 39 - Bots: 121Users: 36,633 (1,460 active)
Latest: Inkticious
Tip: Check the Documents section. Tutorials and other useful information can be found there.Not logged in.
Feature request: enter a page number for forums and sections.
Forum Index - Valley of Bowser - Site Questions, Feedback & Bugs - Feature request: enter a page number for forums and sections.
Pages: « 1 »
It's great that many websites that have a huge list in pagination that lets user jump to specific page without tediously going 1 page at a time (as well as showing the last number to get to the end without having to “scroll” through the numbers).

Here is an example:

Originally posted by Page number to jump to:
1 2 3 ... 500


But would it be cool if there is an input box that lets the user jump to a specified number instead of the number range shown, for example:

Originally posted by Page number to jump to:
1 2 3 ... 500 Jump to specific page:


This would be great for forums, sections, and pretty much anywhere when there are a lot of content that would make the page number such a large value, that way, I can jump to any number, say 200, without having to pick the closest number, and try to “scroll” through it until it appears on the page list number.

--------------------
Give thanks to RPG hacker for working on Asar.
No-one will probably bother doing that so here's a workaround you can try: Go to page 2, then find something that looks like "page=2" in the URL and change that to the page number you want to go to. If you really want then you can create a Tampermonkey script that will add a box like what you described.
Oh, you mean (example):

https://www.smwcentral.net/?p=section&s=smwmusic&u=0&n=2&o=date&d=desc

https://www.smwcentral.net/?p=viewforum&f=6&page=2&sort=date&order=desc

--------------------
Give thanks to RPG hacker for working on Asar.
Yes, exactly.
Originally posted by randomdude999
If you really want then you can create a Tampermonkey script that will add a box like what you described.


Code
// ==UserScript==
// @name         Ran's "Jump To Page" Thing for SMWCentral
// @match        http*://www.smwcentral.net/?p=viewthread*
// @grant        none
// ==/UserScript==

document.body.onload = function() {ransJumpToPageThing();};
function ransJumpToPageThing() {
    'use strict';
    var navImg = document.querySelectorAll("[alt='']");
    for (var i = 0; i < navImg.length; i++) {
        if (navImg[i].getAttribute('border') !== '0') {continue;}
        var form = document.createElement("form");
        form.style.display = "inline-block";
        form.addEventListener("submit", function(e) {
            e.preventDefault();
            window.location.href = window.location.href.replace(/page=\d+/, "page=" + 
            e.target.children[0].value).replace(/pid=\d+/, "").replace(/#p\d+/, "");
        });
        form.action = "javascript:;";
        var placeholder = window.location.href.match(/page=\d+/);
        placeholder = placeholder[0].replace(/page=/, "");
        form.innerHTML = "&nbsp;- Jump to page: <input type='number' min='1' max='9e+4' placeholder='" + 
        placeholder + "'>";
        var parent = navImg[i].parentNode;
        if (parent.tagName === "A") {parent = parent.parentNode;}
        parent.appendChild(form);
    }
}


The only downside is that it only renders when EVERYTHING else on the page has already loaded, including images.

If anything else is broken with this script, please let me know.

EDIT: Table-stretch removed.
"The quieter you become, the more you are able to hear." --Ram Dass
Well, that didn't worked, (I pasted the whole code and replaced the entire box in tampermonkey script editor with that code, it shows a yellow triangle with a ! symbol on line 19).

Thanks for trying. Smwc should've stickied a thread for a list of scripts.

--------------------
Give thanks to RPG hacker for working on Asar.
I just realized you wanted one for all instances of forums and sections. I, for whatever dumb reason, thought you wanted it just for threads. Welp.

That single yellow warning saying "Script URL." is normal, just ignore it.


Code
// ==UserScript==
// @name         Ran's "Jump To Page" Thing for SMWCentral v2
// @match        http*://www.smwcentral.net/?p=viewthread*
// @match        http*://www.smwcentral.net/?p=viewforum*
// @match        http*://www.smwcentral.net/?p=section*
// @grant        none
// ==/UserScript==

document.body.onload = function() {ransJumpToPageThing();};
function ransJumpToPageThing() {
    'use strict';
    var navImg = document.querySelectorAll("[alt='']");
    for (var i = 0; i < navImg.length; i++) {
        if (navImg[i].getAttribute('border') !== '0') {continue;}
        var form = document.createElement("form");
        form.style.display = "inline-block";
        form.addEventListener("submit", function(e) {
            e.preventDefault();
            if (!window.location.href.match(/(page|n)=\d+/)) {
                if (window.location.href.match("p=section")) {
                    window.location.href += "&n=" + e.target.children[0].value;
                } else {
                    window.location.href += "&page=" + e.target.children[0].value;
                }
            } else {
                var match = window.location.href.match(/(page|n)=/);
                window.location.href = window.location.href.replace(/(page|n)=\d+/, match[0] + 
                e.target.children[0].value).replace(/pid=\d+/, "").replace(/#p\d+/, "");
            }
        });
        form.action = "javascript:;";
        var placeholder = window.location.href.match(/(page|n)=\d+/);
        if (!placeholder) {placeholder = ["n=1"];}
        placeholder = placeholder[0].replace(/(page|n)=/, "");
        form.innerHTML = "&nbsp;- Jump to page: <input type='number' min='1' max='9e+4' placeholder='" + 
        placeholder + "'>";
        var parent = navImg[i].parentNode;
        if (parent.tagName === "A") {parent = parent.parentNode;}
        parent.appendChild(form);
    }
}


EDIT: Table-stretch removed.
"The quieter you become, the more you are able to hear." --Ram Dass
The first code suddenly started working on the forums only (nevermind of my previous code saying not working), as for the second one, also worked for all places.

Thanks!

--------------------
Give thanks to RPG hacker for working on Asar.
Pages: « 1 »
Forum Index - Valley of Bowser - Site Questions, Feedback & Bugs - Feature request: enter a page number for forums and sections.

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2018 - SMW Central
Legal Information - Privacy Policy - Link To Us


Total queries: 23

Menu

Follow Us On

  • Facebook
  • Twitter
  • YouTube

Affiliates

  • Talkhaus
  • SMBX Community
  • GTx0
  • Super Luigi Bros
  • ROMhacking.net
  • MFGG
  • Gaming Reinvented