Hacker News new | past | comments | ask | show | jobs | submit login

I remember from ~10-15 years ago, in the Opera browser there was a button to go foward even when you did not go backwards. It was pretty good at guessing what the next page was going to be (example.com/1.html > 2.html, 2005-08.jpg > 2005-09.jpg etc.)



The feature was called fast forwarding, and old Opera's successor Vivaldi still has it. For those unfamiliar with it, it also works with more complex pagination schemes than just incrementing the number at the end; e.g. Google or Bing searches.

I remember Opera also had (and Vivaldi has, I just found) an optional feature where continuing to press space after reaching the end of the page would trigger fast-forward and take you to the next page. Sort of an alternative way of infinite scrolling.


I have a “+1” bookmarklet with a similar goal. It’s not very smart, just finds the last number in a URL and increments it, but that’s usually good enough.


For anyone interested, I reproduced the bookmarklet in question:

    javascript:(function() {var num = null;var found = window.location.toString().match(/(\d+)(?!.*\d)/);if (found != null) {num = parseInt(found[0])+1};if (num != null) {window.location=(window.location.toString().replace(/(\d+)(?!.*\d)/,num))};})()
I'm not a Javascript person, so I'm not sure if there is a better way but it seems to work.


I think mine came from here many years ago: https://www.squarefree.com/bookmarklets/misc.html#increment

The "works in" browser icons gives some idea of the date on that. IE, Phoenix, Netscape 4, and Opera. Probably some of the oldest still-in-use javascript in the world :P

Ran it through prettier.io:

    javascript: (function() {
        var e, s;
        IB = 1;
        function isDigit(c) {
            return "0" <= c && c <= "9";
        }
        L = location.href;
        LL = L.length;
        for (e = LL - 1; e >= 0; --e)
            if (isDigit(L.charAt(e))) {
            for (s = e - 1; s >= 0; --s) if (!isDigit(L.charAt(s))) break;
            break;
            }
        ++s;
        if (e < 0) return;
        oldNum = L.substring(s, e + 1);
        newNum = "" + (parseInt(oldNum, 10) + IB);
        while (newNum.length < oldNum.length) newNum = "0" + newNum;
        location.href = L.substring(0, s) + newNum + L.slice(e + 1);
    })();


If viewing "private" information vulnerable to an enumeration attack, would this be considered hacking? See also weev.


That's how Zuckerberg built his app before Facebook.


If I'm not mistaken qutebrowser also has this feature.


Yup! It has various kinds of shortcuts for this kind of thing (increment/decrement number, find prev/next link, remove component from path).

If you're curious, the implementation is here: https://github.com/qutebrowser/qutebrowser/blob/master/quteb...


It is a common feature in vimperator-like browsers.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: