您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
double click checkbox to toggle all similar
// ==UserScript== // @name Big Al sell all // @namespace namespace // @version 0.1 // @description double click checkbox to toggle all similar // @author tos // @match *.torn.com/bigalgunshop.php* // @grant none // ==/UserScript== function LI_addListener(li) { const item_id = li.getAttribute('data-item') const checkbox_LABEL = li.querySelector('input[type=checkbox]+LABEL') if (checkbox_LABEL) checkbox_LABEL.addEventListener('dblclick', e => document.querySelectorAll(`LI[data-item="${item_id}"] INPUT[type=checkbox]`).forEach(checkbox => checkbox.checked = !checkbox.checked)) } const observer = new MutationObserver((mutations) => { for (const mutation of mutations) { for (const node of mutation.addedNodes) { if (node.nodeName && node.nodeName === 'LI' && node.hasAttribute('data-item')) LI_addListener(node) } } }) const wrapper = document.querySelector('UL.sell-items-list') wrapper.querySelectorAll('LI[data-item]').forEach((li) => { LI_addListener(li) }) observer.observe(wrapper, { subtree: true, childList: true })
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址