Remove Url SEO Parameters

Remove Redundant Url SEO Parameters

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Remove Url SEO Parameters
// @namespace    https://github.com/livinginpurple
// @version      2020.11.06.24
// @description  Remove Redundant Url SEO Parameters
// @author       livinginpurple
// @match        http://*.pixnet.net/*
// @match        https://*.pixnet.net/*
// @match        http://blog.xuite.net/*
// @match        https://blog.xuite.net/*
// @match        http://*.techbang.com/posts/*
// @match        https://*.techbang.com/posts/*
// @match        https://*.dcard.tw/*
// @match        https://*.inside.com.tw/*
// @match        https://*.logdown.com/*
// @match        https://cookpad.com/tw/*
// @run-at       document-start
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    const scriptName = GM_info.script.name;
    console.log(`${scriptName} is loading.`);
    // 修改網址,且不留下歷史紀錄
    window.history.replaceState({},
        window.title,
        window.location.href.split('-')[0]
    );
    console.log(`${scriptName} is running.`);
})(document);