您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a blue dotted outline around the element you right-click on, and updates the outline as you move the cursor while right-clicking
// ==UserScript== // @name Right-Click Dotted Outline // @namespace http://tampermonkey.net/ // @license MIT // @version 2.0 // @description Adds a blue dotted outline around the element you right-click on, and updates the outline as you move the cursor while right-clicking // @author Your Name // @match *://*/* // @grant none // ==/UserScript== (function() { 'use strict'; let isRightClicking = false; let highlightedElement = null; document.addEventListener('mousedown', (event) => { if (event.button === 2) { // Right-click isRightClicking = true; highlightElement(event.target); document.addEventListener('mousemove', highlightOnHover); document.addEventListener('mouseup', stopRightClick); } }); function highlightElement(element) { if (highlightedElement) { highlightedElement.style.outline = ''; } element.style.outline = '2px dotted blue'; highlightedElement = element; } function highlightOnHover(event) { if (isRightClicking) { highlightElement(event.target); } } function stopRightClick(event) { if (event.button === 2) { // Right-click isRightClicking = false; if (highlightedElement) { highlightedElement.style.outline = ''; } document.removeEventListener('mousemove', highlightOnHover); document.removeEventListener('mouseup', stopRightClick); } } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址