您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
try to take over the world!
// ==UserScript== // @name YouTuBu click text link open new tab // @namespace https://bbs.tampermonkey.net.cn/ // @version 0.1.3 // @description try to take over the world! // @author xiaofeiwu // @match https://www.youtube.com/ // @run-at document-end // @grant GM_addStyle // @license MIT // ==/UserScript== (function () { 'use strict'; setTimeout(() => { // document.body.addEventListener('click', (event) => { // event.stopPropagation(); // event.preventDefault(); // }) const textHrefList = document.querySelectorAll('#video-title-link') for (let i = 0; i < textHrefList.length; i++) { textHrefList[i].style.backgroundColor = 'skyblue' } const links = document.querySelectorAll('a[href*="/watch?v="]'); for (let i = 0; i < links.length; i++) { links[i].addEventListener('click', (event) => { event.stopPropagation(); // 阻止事件冒泡 event.preventDefault(); // 阻止链接的跳转行为 window.open(links[i].href, '_blank'); // 在新标签页中打开链接 }); } }, 3000) })(); // GM_addStyle(` // #video-title-link { // backgroundColor: 'skyBlue' // } // `)
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址