您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
将形如「/s/video/*」的链接重定向至「/video/*」
// ==UserScript== // @name Bilibili 主站重定向 // @namespace https://www.imbytecat.com/ // @version 1.2.3 // @description 将形如「/s/video/*」的链接重定向至「/video/*」 // @author imbytecat // @match *://*.bilibili.com/s/* // @run-at document-start // @grant none // @license MIT // ==/UserScript== (() => { const re = /^(http|https):\/\/(www.)?bilibili.com\/s\/video\/.+/; const url = new URL(location.href); if (re.test(url.href)) { window.stop(); url.pathname = url.pathname.replace(/\/s/, ""); location.replace(url); } })();