您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Redirect YouTube URLs to specified front-end instance.
// ==UserScript== // @name Redirect YouTube to Front-End // @version 0.5 // @description Redirect YouTube URLs to specified front-end instance. // @author seaque // @license MIT // @namespace https://github.com/seaque/tampermonkey-scripts // @match *://*.youtube.com/* // @icon https://upload.wikimedia.org/wikipedia/commons/a/a6/YouTube_social_dark_square_%282017%29.svg // @run-at document-start // ==/UserScript== (function() { 'use strict'; // Default front-end instance // Change it to whatever you like. const frontEndInstance = "inv.nadeko.net"; const redirectToFrontEnd = () => { const url = new URL(window.location.href); if (url.hostname === "www.youtube.com" && url.pathname === "/watch") { const videoId = url.searchParams.get("v"); if (videoId) { const frontEndUrl = `https://${frontEndInstance}/watch?v=${videoId}`; window.location.replace(frontEndUrl); } } }; redirectToFrontEnd(); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址