// ==UserScript== // @name letitbit.old-web.com - пропуск таймера. // @namespace https://github.com/you // @version 0.1 // @description Пропускает таймер на letitbit.old-web.com. // @author You // @match https://letitbit.old-web.com/download.php* // @grant none // @run-at document-start // ==/UserScript== (function() { 'use strict'; function showDownloadLink() { let downloadDiv = document.getElementById('download-link'); if (downloadDiv) { downloadDiv.style.display = 'block'; return true; } return false; } function hideTimer() { let waitContainer = document.getElementById('wait-container'); if (waitContainer) { waitContainer.style.display = 'none'; } } function tryShowLink() { if (showDownloadLink()) { hideTimer(); observer.disconnect(); clearInterval(intervalId); } } const intervalId = setInterval(tryShowLink, 150); const observer = new MutationObserver((mutations) => { tryShowLink(); }); observer.observe(document.documentElement || document.body, { childList: true, subtree: true }); document.addEventListener('DOMContentLoaded', tryShowLink); setTimeout(() => { tryShowLink(); if (!document.getElementById('download-link')) { clearInterval(intervalId); observer.disconnect(); } }, 5000); })();