crunchy_soup / Neopets Event Icon Blocker

// ==UserScript==
// @name         Neopets Event Icon Blocker
// @namespace    http://tampermonkey.net/
// @version      1.0.1
// @description  Blocks the specific "hp-event-icon" element on the Neopets homepage for events like Christmas 2025. Supports both /home/ and /home/index.phtml.
// @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}`);
    }
})();