// Tunggu hingga halaman selesai dimuat document.addEventListener("DOMContentLoaded", function() { // Target elemen /games/4d/p4851 const gameLink = document.querySelector('a[href="/games/4d/p4851"]'); if (!gameLink) return; // NOMOR 1: ubah class & style gameLink.classList.remove('game-lobby-content'); gameLink.style.position = 'relative'; gameLink.style.height = '100%'; // NOMOR 2: hapus .effect7 & .game-title, tambahkan .item-data const effect7 = gameLink.querySelector('.effect7'); let itemData; if (effect7) { // Hapus .game-title const gameTitle = effect7.querySelector('.game-title'); if (gameTitle) gameTitle.remove(); // Tambahkan item-data itemData = document.createElement('div'); itemData.className = 'item-data'; itemData.style.cssText = ` position: absolute; display: flex; width: 100%; height: 100%; justify-content: end; flex-direction: column; align-items: center; gap: 0px; padding: 10px; margin-top: 100px !important; font-size: 16px; `; const subItemData = document.createElement('div'); subItemData.className = 'sub-item-data'; subItemData.style.cssText = 'display: flex; gap: 10px; width: 100%; margin-top: -100px !important;'; itemData.appendChild(subItemData); // Pindahkan semua elemen lain dari .effect7 ke subItemData while (effect7.firstChild) { const child = effect7.firstChild; if (child !== gameTitle) subItemData.appendChild(child); else child.remove(); } // Ganti effect7 dengan itemData gameLink.appendChild(itemData); effect7.remove(); } // NOMOR 3: ubah style .game-angka const gameAngka = gameLink.querySelector('.game-angka'); if (gameAngka) { gameAngka.style.cssText = ` border: 1px solid white; padding: 5px; border-radius: 5px; flex: 1; color: white; display: flex; justify-content: center; height: 100%; `; } // NOMOR 4: ubah style .lobby-game-angka-keluar const angkaKeluar = gameLink.querySelector('.lobby-game-angka-keluar'); if (angkaKeluar) { angkaKeluar.style.color = 'white'; } // NOMOR 5: ubah .game-lobby-bottom const bottom = gameLink.querySelector('.game-lobby-bottom'); if (bottom) { bottom.classList.add('timer'); bottom.style.cssText = ` display: flex; flex: 1; justify-content: center; padding-bottom: 0; `; } // NOMOR 6: ubah style .timer-game const timer = gameLink.querySelector('.timer-game'); if (timer) { timer.style.cssText = ` border: 1px solid #08f851; padding: 5px; border-radius: 5px; flex: 1; color: #08f851; text-align: center; `; } // === HANDLE BET CLOSED === const betClosed = gameLink.querySelector('.game-lobby-live'); if (betClosed) { betClosed.style.cssText = ` border: 1px solid #ff4d4d; padding: 5px; border-radius: 5px; flex: 1; color: #ff4d4d; text-align: center; font-weight: bold; font-size: 10px; `; // pastikan wrapper tetap flex-center const liveWrapper = betClosed.closest('.game-lobby-live-wrapper'); if (liveWrapper) { liveWrapper.style.cssText = ` display: flex; width: 100%; justify-content: center; `; } } // NOMOR 7: tambahkan container-watch di dalam item-data if (itemData) { const containerWatch = document.createElement('div'); containerWatch.className = 'container-watch'; containerWatch.style.cssText = ` width: 100%; display: flex; justify-content: center; align-items: center; margin-top: 10px; /* jarak dari angka result */ `; containerWatch.innerHTML = ` btn_live `; itemData.appendChild(containerWatch); } // Tambahkan juga thumbnail di luar item-data const thumb = document.createElement('img'); thumb.src = 'https://lottoidn.com/djitoto/totomart-mobile.jpg'; thumb.alt = 'thumbnail'; thumb.style.cssText = 'width: 100%; position: unset; display: block; overflow: hidden; height: 100%;'; thumb.className = 'processed'; gameLink.appendChild(thumb); });