您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Restores the middle-click functionality on YouTube's thumbnails.
// ==UserScript== // @name Restore Middle-Click on YouTube Thumbnails // @version 1.0 // @description Restores the middle-click functionality on YouTube's thumbnails. // @author puncia // @match https://www.youtube.com/* // @grant none // @namespace https://greasyfork.org/users/1100557 // ==/UserScript== (function() { 'use strict'; // Function to handle the middle-click event function handleMiddleClick(event) { // Check if the middle mouse button was clicked if (event.button === 1) { // Prevent the default behavior (scrolling) event.preventDefault(); // Open the video in a new tab window.open(this.href, '_blank'); } } // Get all the thumbnail elements var thumbnails = document.querySelectorAll('.yt-simple-endpoint.inline-block.style-scope.ytd-thumbnail'); // Attach the middle-click event listener to each thumbnail thumbnails.forEach(function(thumbnail) { thumbnail.addEventListener('auxclick', handleMiddleClick); }); })();