您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Add a toggle button to show/hide cards checked with the class 'checked' on Pokellector.
// ==UserScript== // @name Pokellector Toggle Visibility Script // @namespace http://tampermonkey.net/ // @version 0.3 // @description Add a toggle button to show/hide cards checked with the class 'checked' on Pokellector. // @author ArthurShelby // @match https://www.pokellector.com/ // @icon https://www.google.com/s2/favicons?sz=64&domain=pokellector.com // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; // Create the toggle button const toggleButton = document.createElement('button'); toggleButton.textContent = 'Hide Completed'; // Initial text toggleButton.style.position = 'fixed'; toggleButton.style.top = '10px'; toggleButton.style.right = '10px'; toggleButton.style.zIndex = '1000'; toggleButton.style.padding = '10px'; toggleButton.style.backgroundColor = '#007bff'; toggleButton.style.color = 'white'; toggleButton.style.border = 'none'; toggleButton.style.borderRadius = '5px'; toggleButton.style.cursor = 'pointer'; // Add the button to the page document.body.appendChild(toggleButton); // Add toggle functionality let isHidden = false; // Initial state: visible toggleButton.addEventListener('click', () => { document.querySelectorAll('.checked').forEach(el => { el.style.display = isHidden ? '' : 'none'; // Toggle visibility }); isHidden = !isHidden; // Update toggle state toggleButton.textContent = isHidden ? 'Show Completed' : 'Hide Completed'; // Update button text }); })();