Neopets Event Icon Blocker

Blocks specific event icon on the Neopets homepage. Intended fir Christmas 2025.

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Neopets Event Icon Blocker
// @namespace    http://tampermonkey.net/
// @version      1.0.0
// @description  Blocks specific event icon on the Neopets homepage. Intended fir Christmas 2025.
// @author       Logan Bell
// @match        https://www.neopets.com/home/
// @match        https://www.neopets.com/home/index.phtml
// @grant        none
// @run-at       document-idle
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // Define the selector for the element you want to block.
    // This targets the main event icon container.
    const selectorToBlock = '.hp-event-icon';

    // Find the element in the DOM.
    const element = document.querySelector(selectorToBlock);

    if (element) {
        // Block the element by completely hiding it using 'display: none'.
        // If the element causes layout shift, you could alternatively use
        // element.remove(); to remove it completely from the DOM, but hiding is safer.
        element.style.display = 'none';

        // Log to console to confirm the script ran (optional)
        console.log(`[Neopets Event Blocker] Successfully hid element: ${selectorToBlock}`);
    } else {
        // Log to console if the element wasn't found (optional)
        console.log(`[Neopets Event Blocker] Element not found: ${selectorToBlock}`);
    }
})();