您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Hide yo wife, hide yo kids, hide yo itemboxes
// ==UserScript== // @name IdlePixel Item Hider // @namespace com.anwinity.idlepixel // @version 1.0.0 // @description Hide yo wife, hide yo kids, hide yo itemboxes // @author Anwinity // @license MIT // @match *://idle-pixel.com/login/play* // @grant none // @require https://greasyfork.org/scripts/441206-idlepixel/code/IdlePixel+.js?anticache=20220905 // ==/UserScript== (function() { 'use strict'; const items = $("itembox[data-item]").toArray().map(el => el.getAttribute("data-item")).sort(); class ItemHiderPlugin extends IdlePixelPlusPlugin { constructor() { super("itemhider", { about: { name: GM_info.script.name, version: GM_info.script.version, author: GM_info.script.author, description: GM_info.script.description }, config: [ ... items.map(i => { return { id: "hide-"+i, label: "Hide "+i, type: "boolean", default: false } }) ] }); } onConfigsChanged() { items.forEach(i => { const hide = this.getConfig("hide-"+i); if(hide) { $(`itembox[data-item="${i}"]`).addClass("force-hidden"); } else { $(`itembox[data-item="${i}"]`).removeClass("force-hidden"); } }); } onLogin() { const self = this; $("head").append(` <style id="styles-itemhider"> itembox.force-hidden { display: none !important; } </style> `); this.onConfigsChanged(); } } const plugin = new ItemHiderPlugin(); IdlePixelPlus.registerPlugin(plugin); })();