Greasy Fork URL Script Name Cleanup

Cleanup Greasy Fork URL Script Name

Versione datata 25/09/2021. Vedi la nuova versione l'ultima versione.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo 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                  Greasy Fork URL Script Name Cleanup
// @name:zh-CN            Greasy Fork URL 脚本名称清理
// @version               1.1.2.20210925
// @namespace             laster2800
// @author                Laster2800
// @description           Cleanup Greasy Fork URL Script Name
// @description:zh-CN     清理 Greasy Fork URL 中的脚本名称
// @icon                  https://api.iowen.cn/favicon/greasyfork.org.png
// @homepageURL           https://greasyfork.org/zh-CN/scripts/431940
// @supportURL            https://greasyfork.org/zh-CN/scripts/431940/feedback
// @license               LGPL-3.0
// @noframes
// @include               /^https?:\/\/(greasy|sleazy)fork\.org\/[^/]+\/scripts\/\d+-/
// @grant                 none
// @run-at                document-start
// ==/UserScript==

const m = /(\/[^/]+\/scripts\/\d+)-[^/]+(\/.*)?/.exec(location.pathname)
history.replaceState({}, null, `${location.origin}${m[1]}${m[2] ?? ''}${location.search}${location.hash}`)