Disable Back Navigation via Touchpad (overscroll-behavior: none;)

Remove overscroll on the main page content and suppress previous page navigation.

Versione datata 22/08/2025. Vedi la nuova versione l'ultima versione.

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!)

// ==UserScript==
// @name                Disable Back Navigation via Touchpad (overscroll-behavior: none;)
// @name:ja             タッチパッドで前ページに戻る機能無効化(overscroll-behavior: none;)
// @name:en             Disable Back Navigation via Touchpad (overscroll-behavior: none;)
// @namespace           https://github.com/hi2ma-bu4
// @version             1.0.0
// @description         Remove overscroll on the main page content and suppress previous page navigation.
// @description:ja      ページ本体のみのoverscrollを無くして、prevPageを抑制
// @description:en      Remove overscroll on the main page content and suppress previous page navigation.
// @author              hi2ma-bu4 (snows)
// @license             Apache-2.0
// @match               *://*/*
// @icon                data:image/svg+xml;base64,PCEtLT94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPy0tPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iX3gzMV8wIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9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zQ5eiIgc3R5bGU9ImZpbGw6IHJnYig3NSwgNzUsIDc1KTsiPjwvcGF0aD48L2c+PC9zdmc+
// @supportURL          https://github.com/hi2ma-bu4/disable-touch-back
// @compatible          chrome
// @compatible          edge
// @compatible          opera
// @compatible          firefox
// @grant               GM.addStyle
// @run-at              document-idle
// @noframes
// ==/UserScript==

(function() {
    'use strict';

    function init() {
        try {
			GM.addStyle(`
html, body {
  overscroll-behavior-x: none;
}
`);
		} catch (e) {
			console.warn(e);
		}
    }

    init();
})();