您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Binds the Delete key to trigger SVG trash button click in rabbit hole
当前为
// ==UserScript== // @name Bind Delete Key to Delete Button in Rabbit Hole // @namespace http://tampermonkey.net/ // @license GNU GPLv3 // @version 1.0 // @description Binds the Delete key to trigger SVG trash button click in rabbit hole // @author You // @match *://hole.rabbit.tech/* // @grant none // ==/UserScript== (function() { 'use strict'; // Function to trigger a click on the second SVG button function triggerDeleteAction() { try { // Select the div containing the buttons const container = document.querySelector('div.ml\\:flex.hidden.items-center.space-x-2'); if (container) { // Select all SVG buttons within the container const svgButtons = container.querySelectorAll('svg'); if (svgButtons.length > 1) { // Click the second button svgButtons[1].dispatchEvent(new MouseEvent('click', { bubbles: true })); } else { console.error('Second SVG button not found'); } } else { console.error('Container not found'); } } catch (error) { console.error('Error triggering delete action:', error); } } // Add event listener for keydown events document.addEventListener('keydown', function(event) { if (event.key === 'Delete') { triggerDeleteAction(); event.preventDefault(); // Prevent default behavior if necessary } }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址