您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Set ignore lists to keep specific items in the inventory
// ==UserScript== // @name GC - Quickstock Keeper // @namespace http://tampermonkey.net/ // @version 1.0 // @description Set ignore lists to keep specific items in the inventory // @author jess (wibreth) // @match https://www.grundos.cafe/quickstock* // @icon https://www.google.com/s2/favicons?sz=64&domain=grundos.cafe // @grant GM_getValue // @grant GM_setValue // @grant GM_registerMenuCommand // ==/UserScript== (function() { 'use strict'; /* globals $ */ $(document).ready(() => { function ignoreItems(ignore) { $('input[disabled]').prop('disabled', false); $('.data.justify-right.align-right span').each(function() { if (ignore.indexOf($(this).text()) >= 0) { const id = $(this).data('itemid'); $(`input[name="${id}"]`).prop('disabled', true); } }); } let ignore = GM_getValue('ignore', []).join(','); GM_registerMenuCommand('Set Ignore List', function() { let value = prompt('Enter a comma separated list of which items to ignore', GM_getValue('ignore', []).join(',')); if (value) { ignore = []; for (const item of value.split(',')) ignore.push(item.trim()); GM_setValue('ignore', ignore); ignoreItems(ignore); } }, 'i'); ignoreItems(ignore); $('.action input').change(() => { $('input[disabled]').prop('checked', false); }); }); })();