Greasy Fork is available in English.

9gag - Scroll down to current position

Scroll down back where the focus was when you clicked the arrow-up icon or scrolled up

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

Autore
Achernar
Installazioni giornaliere
0
Installazioni totali
14
Valutazione
0 0 0
Versione
0.3.1
Creato il
19/09/2022
Aggiornato il
15/07/2023
Dimensione
2,58 KB
Licenza
Non disponibile
Applica a

This userscript is an attempt to allow a 9gag user to easily scroll back to the position on the page focused when he clicked the "scroll to top" icon. Or if the user scrolled up to read a comment again, and wants to resume where he was.



The userscript adds one or two button to allow you to scroll back down to the position where the viewport was when you clicked 9gag's up arrow.

Once you start scrolling the page, 9gag displays the up arrow at the bottom-right corner of the window.

If you scroll up, either manually or by clicking the up arrow, the userscript displays a down arrow in the top-right corner of the page. Clicking it moves you back to the farther position that you reached when scrolling down.
This icon disappears when you have moved down at least as far as you were, either by scrolling manually or by clicking it.

A second down arrow appears under the first one when you click the up arrow and have already scrolled a little (in short, when the first down arrow is visible). Clicking this second arrow moves you down were you where when you click the up arrow. Which is not as far as the first down arrow will bring you.
This arrow disappears when you scroll down pass the position.


The script remembers the positions for all sections visited in the same "long-lived" page (when the page is dynamically update but not fully reloaded). Say you click the "Home", scroll up/down a little ; then click "Trending", scroll there too. When you click "Home" again, 9gag remember your scrolling position, and the userscript, the state of its buttons.


For more userscripts, styles, extensions, tips, ..., visit my programming page.