您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
직링 리디렉션기능
// ==UserScript== // @name lolcast_redirect // @namespace lolcast_redirect // @version 0.2 // @description 직링 리디렉션기능 // @author You // @match https://insagirl-toto.appspot.com/chatting/lgic/* // @grant none // ==/UserScript== (function() { 'use strict'; // Function to change the href of YouTube links var changeLinks = function() { var anchors = document.getElementsByTagName('a'); for (var i = 0; i < anchors.length; i++) { var anchor = anchors[i]; if (anchor.href.includes('https://youtu.be/')) { var videoId = anchor.href.split('https://youtu.be/')[1]; anchor.href = 'https://lolcast.kr/#/player/youtube/' + videoId; } else if (anchor.href.includes('https://www.youtube.com/watch?v=')) { var videoId = anchor.href.split('https://www.youtube.com/watch?v=')[1]; // Remove any additional parameters after '&' videoId = videoId.split('&')[0]; anchor.href = 'https://lolcast.kr/#/player/youtube/' + videoId; } } }; // Create a MutationObserver to watch for changes in the DOM var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (mutation.type === 'childList') { changeLinks(); } }); }); // Start observing the document with the configured parameters observer.observe(document.body, { childList: true, subtree: true }); })();