您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Add action buttons to Neopets Quick Stock page
当前为
// ==UserScript== // @name Neopets Quick Stock Extra Buttons // @version 0.4 // @description Add action buttons to Neopets Quick Stock page // @match https://www.neopets.com/quickstock.phtml* // @icon https://images.neopets.com/new_shopkeepers/t_1900.gif // @author Posterboy // @namespace https://gf.qytechs.cn/users/1277376 // @grant none // ==/UserScript== (function() { 'use strict'; function createToolbar() { let form = document.querySelector('form[name="quickstock"]'); if (!form) return; let toolbar = document.createElement('div'); toolbar.style.marginBottom = '15px'; toolbar.style.padding = '10px'; toolbar.style.backgroundColor = '#f4f4f4'; toolbar.style.border = '1px solid #ddd'; toolbar.style.borderRadius = '5px'; toolbar.style.boxShadow = '0 2px 5px rgba(0, 0, 0, 0.1)'; toolbar.style.textAlign = 'center'; let stockAllBtn = document.createElement('button'); stockAllBtn.textContent = 'Stock All'; stockAllBtn.style.padding = '10px 20px'; stockAllBtn.style.marginRight = '10px'; stockAllBtn.style.backgroundColor = '#4CAF50'; stockAllBtn.style.color = 'white'; stockAllBtn.style.border = 'none'; stockAllBtn.style.borderRadius = '4px'; stockAllBtn.style.cursor = 'pointer'; stockAllBtn.type = 'button'; stockAllBtn.onclick = () => selectAction('stock'); let depositAllBtn = document.createElement('button'); depositAllBtn.textContent = 'Deposit All'; depositAllBtn.style.padding = '10px 20px'; depositAllBtn.style.backgroundColor = '#2196F3'; depositAllBtn.style.color = 'white'; depositAllBtn.style.border = 'none'; depositAllBtn.style.borderRadius = '4px'; depositAllBtn.style.cursor = 'pointer'; depositAllBtn.type = 'button'; depositAllBtn.onclick = () => selectAction('deposit'); toolbar.appendChild(stockAllBtn); toolbar.appendChild(depositAllBtn); let table = form.querySelector('table'); table.parentNode.insertBefore(toolbar, table); } function selectAction(action) { let radios = document.querySelectorAll(`input[name^="radio_arr"]`); radios.forEach(radio => { if (radio.value === action) { radio.checked = true; } }); document.querySelector('form[name="quickstock"]').submit(); } window.addEventListener('load', createToolbar); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址