(function () { /* ---------- 1) باز شدن خودکار تب Ring Games ---------- */ function goRingGames() { const tabs = document.querySelector('.tabs ul'); if (!tabs) return false; // Ring Games معمولاً دومین li است const ringTab = tabs.querySelector('li:nth-child(2)'); if (!ringTab) return false; // کلیک روی تب Ring Games ringTab.click(); ringTab.dispatchEvent(new MouseEvent('mousedown', { bubbles: true })); ringTab.dispatchEvent(new MouseEvent('mouseup', { bubbles: true })); return true; } // اجرای اولیه و نظارت برای تاخیر لود DOM if (!goRingGames()) { const observer = new MutationObserver(() => { if (goRingGames()) observer.disconnect(); }); observer.observe(document.documentElement, { childList: true, subtree: true }); window.addEventListener('load', () => setTimeout(goRingGames, 1200)); } /* ---------- 2) غیرفعال کردن تب Logins ---------- */ function disableLoginsTab() { const tabs = document.querySelector('.tabs ul'); if (!tabs) return false; // تب اول (Logins) const loginTab = tabs.querySelector('li:nth-child(1)'); if (!loginTab) return false; // جلوگیری از کلیک loginTab.style.pointerEvents = 'none'; loginTab.style.opacity = '0.5'; // کمی کم‌رنگ‌تر برای فهمیدن که غیرفعاله (اختیاری) loginTab.style.cursor = 'not-allowed'; // نشانگر غیرفعال (اختیاری) return true; } // فراخوانی پس از لود DOM if (!disableLoginsTab()) { const mo2 = new MutationObserver(() => { if (disableLoginsTab()) mo2.disconnect(); }); mo2.observe(document.documentElement, { childList: true, subtree: true }); window.addEventListener('load', () => setTimeout(disableLoginsTab, 1200)); } })();