您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Turns YouTube Shorts into normal YouTube videos
// ==UserScript== // @name YouTube UnShortner // @description Turns YouTube Shorts into normal YouTube videos // @icon https://www.google.com/s2/favicons?domain=www.youtube.com // @version 1.0.0 (20/08/2023) // @author gt10i // @homepage https://github.com/gt10i // @namespace Violentmonkey Scripts // @license MIT // @grant none // @run-at document-start // @match https://www.youtube.com/* // @match https://www.youtu.be/* // @match https://m.youtube.com/* // ==/UserScript== if (test(location.href)) { updateUrl() } let previousUrl = ''; let observer = new MutationObserver(function(mutations) { if (location.href !== previousUrl) { if (test(location.href)) { updateUrl() } previousUrl = location.href; console.log(`URL changed to ${location.href}`); } }); observer.observe(document, { childList: true, subtree: true }) function test(url){ var isYouTubeShortUrl = !!url.match(/^(|http(s?):\/\/)(|www.)(youtube.com|youtu.be)\/shorts(\/.*|$)/gim); return isYouTubeShortUrl; } function updateUrl(){ window.location.replace("https://youtube.com/watch?v=" + videoIdFromUrl()); } function videoIdFromUrl(){ const videoIdExtractRegex = /(youtube.com|youtu.be)\/shorts\/([0-9A-Za-z_-]{10}[048AEIMQUYcgkosw]*)/gi; const youtubeRegex = new RegExp(videoIdExtractRegex); const regexResult = youtubeRegex.exec(window.location.href); const videoId = regexResult[2]; return videoId; }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址