您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
通过快速 Alt+右键操作,让任何页面元素轻松消失。
- // ==UserScript==
- // @name VanishIt
- // @namespace https://greasyfork.org/en/users/1451802
- // @version 1.0
- // @description Make any page element disappear effortlessly using a quick Alt+Right-click.
- // @description:de Lassen Sie jedes Element der Seite mühelos verschwinden – mit einem schnellen Alt+Rechtsklick.
- // @description:es Haz desaparecer cualquier elemento de la página sin esfuerzo con un rápido Alt+Clic derecho.
- // @description:fr Faites disparaître n'importe quel élément de la page en un clin d'œil grâce à un rapide Alt+Clic droit.
- // @description:it Fai sparire qualsiasi elemento della pagina senza sforzo usando un rapido Alt+Clic destro.
- // @description:ru С легкостью заставьте любой элемент страницы исчезнуть с помощью быстрого Alt+правого клика.
- // @description:zh-CN 通过快速 Alt+右键操作,让任何页面元素轻松消失。
- // @description:zh-TW 透過快速 Alt+右鍵操作,輕鬆讓任何頁面元素消失。
- // @description:ja Alt+右クリックを使って、どんなページ要素も簡単に消し去ります。
- // @description:ko 빠른 Alt+우클릭으로 페이지의 모든 요소를 손쉽게 제거합니다.
- // @author NormalRandomPeople (https://github.com/NormalRandomPeople)
- // @match *://*/*
- // @grant none
- // @icon https://www.svgrepo.com/show/253495/erase-clean.svg
- // @compatible chrome
- // @compatible firefox
- // @compatible opera
- // @compatible edge
- // @compatible brave
- // @license MIT
- // ==/UserScript==
- (function() {
- 'use strict';
- const customMenu = document.createElement('div');
- customMenu.style.position = 'absolute';
- customMenu.style.backgroundColor = '#fff';
- customMenu.style.border = '1px solid #ccc';
- customMenu.style.padding = '5px 10px';
- customMenu.style.boxShadow = '2px 2px 6px rgba(0,0,0,0.2)';
- customMenu.style.zIndex = 999999999;
- customMenu.style.display = 'none';
- customMenu.style.fontFamily = 'Arial, sans-serif';
- customMenu.style.fontSize = '14px';
- customMenu.style.cursor = 'pointer';
- customMenu.textContent = 'Destroy';
- customMenu.addEventListener('mouseover', () => {
- customMenu.style.backgroundColor = '#eee';
- });
- customMenu.addEventListener('mouseout', () => {
- customMenu.style.backgroundColor = '#fff';
- });
- document.body.appendChild(customMenu);
- let targetElement = null;
- document.addEventListener('contextmenu', (e) => {
- if (e.altKey) {
- e.preventDefault();
- targetElement = e.target;
- customMenu.style.top = `${e.pageY}px`;
- customMenu.style.left = `${e.pageX}px`;
- customMenu.style.display = 'block';
- } else {
- customMenu.style.display = 'none';
- }
- });
- customMenu.addEventListener('click', (e) => {
- if (targetElement && targetElement.parentNode) {
- targetElement.parentNode.removeChild(targetElement);
- }
- customMenu.style.display = 'none';
- e.stopPropagation();
- });
- document.addEventListener('click', () => {
- customMenu.style.display = 'none';
- });
- })();