TorrentBD Shoutbox Prevent Idle Pause

Disables shoutbox auto-pause by faking activity

// ==UserScript==
// @name         TorrentBD Shoutbox Prevent Idle Pause
// @namespace    5ifty6ix
// @version      1.2
// @description  Disables shoutbox auto-pause by faking activity
// @match        https://*.torrentbd.com/*
// @match        https://*.torrentbd.net/*
// @match        https://*.torrentbd.org/*
// @match        https://*.torrentbd.me/*
// @grant        none
// @author       5ifty6ix
// @license      MIT
// ==/UserScript==

(function () {
    'use strict';

    function simulateActivity() {
        const event = new Event('mousemove');
        document.dispatchEvent(event);
    }

    // Fire fake mousemove every 10 seconds to stay "active"
    setInterval(simulateActivity, 10000);

    // Also block known pause functions if they exist
    const observer = new MutationObserver(() => {
        const overlay = document.querySelector('#shoutbox-idle-overlay, .shoutbox-idle, .idle-overlay');
        if (overlay) {
            overlay.style.display = 'none';
        }
    });

    observer.observe(document.body, { childList: true, subtree: true });
})();