您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
simple code
// ==UserScript== // @name youtube shorts redirect // @namespace http://www.youtube.com/joshclark756 // @version 0.1 // @description simple code // @license MIT // @author joshclark756 // @match https://*.youtube.com/* // @exclude *://music.youtube.com/* // @exclude *://*.music.youtube.com/* // @grant none // ==/UserScript== // Function to check and modify the URL function modifyURL() { // Get the current URL var currentURL = window.location.href; // Check if the URL contains a certain word if (currentURL.includes('shorts')) { // Replace the word with a different one var modifiedURL = currentURL.replace('shorts', 'watch'); // Display a popup message // alert('URL modified successfully!'); // Redirect to the modified URL window.location.href = modifiedURL; } else { // If the word is not found, wait for 1 second and check again setTimeout(modifyURL, 1000); } } // Call the function when the page loads window.onload = modifyURL;