Doobie's Torn City Supply Pack Exclusion

Disables the "Yes" button for Torn supply packs. Just remove the script when you are done with exclusion. Does not remove the Open button itself, just removes the Confirmation Button. Should make packs un-useable

// ==UserScript==
// @name         Doobie's Torn City Supply Pack Exclusion
// @namespace    https://www.torn.com/
// @version      2.0
// @description  Disables the "Yes" button for Torn supply packs. Just remove the script when you are done with exclusion. Does not remove the Open button itself, just removes the Confirmation Button. Should make packs un-useable
// @author       DoobieSuckin [3255641]
// @match        https://www.torn.com/item.php
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    function hideDisableYesButton() {
        const supplyPacks = document.querySelectorAll('li[data-category="Supply Pack"]');

        supplyPacks.forEach(pack => {
            const yesButton = pack.querySelector('a.next-act.t-blue.bold.h.decrement-amount');

            if (yesButton) {
                yesButton.style.display = 'none';
                yesButton.style.pointerEvents = 'none';
                yesButton.addEventListener('click', function(event) {
                    event.preventDefault();
                    event.stopPropagation();
                });
            }
        });

        const supplyPackCategory = document.querySelector('li[data-type="Supply Pack"] .supply-pck-category-icon');

        if (supplyPackCategory) {
            supplyPackCategory.style.backgroundColor = '#8B0000';
            supplyPackCategory.style.borderColor = '#8B0000';
        }

        const supplyPackLink = document.querySelector('li[data-type="Supply Pack"] .supply-pck-category-icon');
        if (supplyPackLink) {
            supplyPackLink.setAttribute('title', 'You Currently Have DoobieSuckin [3255641] Supply Pack Exclusion Script on! Disable it to Start Opening Packs again!');
        }
    }

    hideDisableYesButton();

    const observer = new MutationObserver(hideDisableYesButton);
    observer.observe(document.body, { childList: true, subtree: true });

})();