IdlePixel Item Hider

Hide yo wife, hide yo kids, hide yo itemboxes

  1. // ==UserScript==
  2. // @name IdlePixel Item Hider
  3. // @namespace com.anwinity.idlepixel
  4. // @version 1.0.0
  5. // @description Hide yo wife, hide yo kids, hide yo itemboxes
  6. // @author Anwinity
  7. // @license MIT
  8. // @match *://idle-pixel.com/login/play*
  9. // @grant none
  10. // @require https://gf.qytechs.cn/scripts/441206-idlepixel/code/IdlePixel+.js?anticache=20220905
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. const items = $("itembox[data-item]").toArray().map(el => el.getAttribute("data-item")).sort();
  17.  
  18. class ItemHiderPlugin extends IdlePixelPlusPlugin {
  19. constructor() {
  20. super("itemhider", {
  21. about: {
  22. name: GM_info.script.name,
  23. version: GM_info.script.version,
  24. author: GM_info.script.author,
  25. description: GM_info.script.description
  26. },
  27. config: [
  28. ... items.map(i => {
  29. return {
  30. id: "hide-"+i,
  31. label: "Hide "+i,
  32. type: "boolean",
  33. default: false
  34. }
  35. })
  36. ]
  37. });
  38. }
  39.  
  40. onConfigsChanged() {
  41. items.forEach(i => {
  42. const hide = this.getConfig("hide-"+i);
  43. if(hide) {
  44. $(`itembox[data-item="${i}"]`).addClass("force-hidden");
  45. }
  46. else {
  47. $(`itembox[data-item="${i}"]`).removeClass("force-hidden");
  48. }
  49. });
  50. }
  51.  
  52.  
  53. onLogin() {
  54. const self = this;
  55.  
  56. $("head").append(`
  57. <style id="styles-itemhider">
  58.  
  59. itembox.force-hidden {
  60. display: none !important;
  61. }
  62.  
  63. </style>
  64. `);
  65.  
  66. this.onConfigsChanged();
  67. }
  68.  
  69. }
  70.  
  71. const plugin = new ItemHiderPlugin();
  72. IdlePixelPlus.registerPlugin(plugin);
  73.  
  74. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址