您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Alt+1 切到 bgm.tv,Alt+2 切到 bangumi.tv,Alt+3 切到 chii.in
// ==UserScript== // @name Bangumi 域名快捷切换 // @version 1.3 // @description Alt+1 切到 bgm.tv,Alt+2 切到 bangumi.tv,Alt+3 切到 chii.in // @author zintop // @match *://bgm.tv/* // @match *://bangumi.tv/* // @match *://chii.in/* // @license MIT // @grant none // @namespace https://greasyfork.org/zh-CN/users/1386262-zintop // ==/UserScript== (function() { 'use strict'; document.addEventListener('keydown', function(e) { if (!e.altKey) return; const currentPath = window.location.pathname + window.location.search + window.location.hash; if (e.code === 'Digit1') { window.location.href = 'https://bgm.tv' + currentPath; } else if (e.code === 'Digit2') { window.location.href = 'https://bangumi.tv' + currentPath; } else if (e.code === 'Digit3') { window.location.href = 'https://chii.in' + currentPath; } }); })();