您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a button to hide and unhide a specific div
// ==UserScript== // @name Dokemon Hide/Unhide Button // @namespace https://greasyfork.org/en/scripts/485786-dokemon-hide-unhide-button // @version 0.5.1 // @description Adds a button to hide and unhide a specific div // @icon https://raw.githubusercontent.com/productiveops/dokemon/main/web/public/assets/images/favicon.png // @author D3F0NC3UR // @match http://*:9090/* // @grant none // ==/UserScript== (function() { 'use strict'; // Create a button const button = document.createElement('button'); button.innerText = 'Toggle Div'; button.style.position = 'fixed'; button.style.top = '10px'; button.style.left = '10px'; button.style.zIndex = '9999'; button.style.border = 'solid'; // Add click event to toggle the visibility of the specified div button.addEventListener('click', function() { const targetDiv = document.querySelector('.fixed.inset-y-0.z-50.flex.w-72.flex-col'); if (targetDiv) { targetDiv.style.display = (targetDiv.style.display === 'none') ? '' : 'none'; } }); // Append the button to the body document.body.appendChild(button); })();