document.addEventListener('DOMContentLoaded', function () { // 1. Mencari kontainer navigasi atas const topNavbar = document.querySelector('.navbar-top-wrapper'); const actionContainer = topNavbar ? topNavbar.querySelector('.d-flex.justify-content-between.align-items-center.mt-3') : null; if (actionContainer) { // 2. Membuat tombol untuk memicu Modal Helpdesk const helpdeskBtn = document.createElement('div'); helpdeskBtn.classList.add('position-relative'); helpdeskBtn.innerHTML = ` `; actionContainer.appendChild(helpdeskBtn); } const targetModalContainer = document.createElement('div'); targetModalContainer.innerHTML = modalHTML; const firstBodyElement = document.getElementsByTagName('div')[0]; if (firstBodyElement) { firstBodyElement.appendChild(targetModalContainer); } }); (function () { let attemptCount = 0; const maxAttempts = 20; const initTogelSearch = () => { const rowTogel = document.getElementById('row-togel'); const existingSearch = document.getElementById('filter-togel'); if (!rowTogel || existingSearch) return !!existingSearch; // Klik otomatis ke kategori togel jika ada const togelLink = rowTogel.querySelector('a[href="/togel"]'); if (togelLink) togelLink.click(); const carouselTogel = document.querySelector('.owl-carousel.owl-theme.owl-loaded.owl-drag'); if (!carouselTogel) return false; const togelItems = carouselTogel.querySelectorAll('.col-4.col-md-4.col-lg-3.col-xl-2'); if (!togelItems.length) return false; // 1. Injeksi Kolom Input Pencarian Togel const searchWrapper = document.createElement('div'); searchWrapper.id = 'togel-search'; searchWrapper.innerHTML = ''; // 2. Kontainer untuk menampung hasil pasaran yang di-filter const gridWrapper = document.createElement('div'); gridWrapper.id = 'pasaran-override-list'; gridWrapper.className = 'pasaran-grid'; const uniqueTitles = new Set(); const itemElements = []; // 3. Cloning item pasaran asli ke kontainer baru agar bisa di-filter togelItems.forEach((item, index) => { const titleElement = item.querySelector('.pasaran-title'); const titleText = titleElement ? titleElement.textContent.trim() : ''; if (!uniqueTitles.has(titleText)) { uniqueTitles.add(titleText); titleElement.classList.add('text-center\x20h6-rowtg'); const clonedItem = item.cloneNode(true); clonedItem.style.width = '100%'; clonedItem.style.borderRadius = '0'; clonedItem.style.display = index < 16 ? 'flex' : 'none'; // Tampilkan 16 pertama gridWrapper.appendChild(clonedItem); itemElements.push(clonedItem); } }); // Hapus carousel lama, ganti dengan pencarian dan grid baru carouselTogel.remove(); rowTogel.appendChild(searchWrapper); rowTogel.appendChild(gridWrapper); // 4. Membuat tombol "Show More" jika item lebih dari 16 if (itemElements.length > 16) { const showMoreBtn = document.createElement('button'); showMoreBtn.id = 'show-more-btn'; showMoreBtn.textContent = 'Show More Result'; showMoreBtn.className = 'show-more-btn'; let visibleCount = 16; showMoreBtn.addEventListener('click', function () { const nextLimit = Math.min(visibleCount + 4, itemElements.length); for (let i = visibleCount; i < nextLimit; i++) { itemElements[i].style.display = 'flex'; } visibleCount = nextLimit; if (visibleCount >= itemElements.length) { showMoreBtn.style.display = 'none'; } }); gridWrapper.parentNode.insertBefore(showMoreBtn, gridWrapper.nextSibling); } // 5. Event Listener untuk Fungsi Live Search (Filter) const searchInput = document.querySelector('#filter-togel'); if (searchInput) { searchInput.addEventListener('input', function (e) { const keyword = e.target.value.toLowerCase(); let anyMatch = false; itemElements.forEach(item => { const titleElement = item.querySelector('.pasaran-title'); const titleText = titleElement ? titleElement.textContent.toLowerCase() : ''; const isMatch = titleText.includes(keyword); item.style.display = isMatch ? 'flex' : 'none'; if (isMatch) anyMatch = true; }); const globalShowMoreBtn = document.querySelector('#show-more-btn'); if (globalShowMoreBtn) { globalShowMoreBtn.style.display = anyMatch ? 'block' : 'none'; } }); } return true; }; // Interval untuk memastikan elemen HTML sudah dirender sebelum script berjalan const checkExistTimer = setInterval(() => { if (initTogelSearch() || ++attemptCount >= maxAttempts) { clearInterval(checkExistTimer); } }, 50); }()); document.addEventListener('DOMContentLoaded', function () { const loginForm = document.querySelector('#row-loginmenu\x20form'); if (!loginForm) return; // Sembunyikan label bawaan untuk Username dan Password const labels = loginForm.querySelectorAll('label[for="username"], label[for="password"]'); labels.forEach(label => label.remove()); // Ganti menjadi placeholder di dalam kotak input const usernameInput = loginForm.querySelector('#username'); const passwordInput = loginForm.querySelector('#password'); if (usernameInput) { usernameInput.placeholder = 'Username'; usernameInput.style.borderRadius = '8px'; } if (passwordInput) { passwordInput.placeholder = 'Password'; passwordInput.style.borderRadius = '8px'; } // Tambahkan Heading Sambutan di atas form login const welcomeHeading = document.createElement('h6'); welcomeHeading.textContent = 'Silahkan Login Untuk Bermain'; welcomeHeading.className = 'stylish-heading'; welcomeHeading.style.color = 'white'; welcomeHeading.style.marginBottom = '16px'; loginForm.parentNode.insertBefore(welcomeHeading, loginForm); }); document.addEventListener('DOMContentLoaded', function () { // Hanya aktif jika dibuka di layar smartphone/kecil (lebar <= 768px) const isMobile = window.innerWidth <= 768; if (!isMobile) return; const container = document.createElement('div'); container.className = 'bungkus-jackpot'; container.style.marginBottom = '16px'; container.style.marginTop = '16px'; container.style.display = 'flex'; container.style.justifyContent = 'center'; // Membuat struktur Box Tampilan Jackpot const jackpotBox = document.createElement('div'); jackpotBox.id = 'progresif-jackpot'; jackpotBox.style.width = '360px'; jackpotBox.style.height = '70px'; jackpotBox.style.background = 'url(https://img.suksesidrbo1.com/img_68b02ec5565e7.gif)\x20center'; jackpotBox.style.backgroundSize = '100%\x20100%'; jackpotBox.style.borderRadius = '5px'; jackpotBox.style.display = 'flex'; jackpotBox.style.flexDirection = 'column'; jackpotBox.style.justifyContent = 'flex-end'; jackpotBox.style.alignItems = 'center'; jackpotBox.style.paddingBottom = '6px'; jackpotBox.style.color = '#FFD700'; // Warna Emas jackpotBox.style.fontWeight = 'bold'; jackpotBox.style.fontSize = '17px'; const textLabelRow = document.createElement('div'); textLabelRow.style.lineHeight = '1.2'; textLabelRow.style.marginBottom = '0.98'; const labelSpan = document.createElement('span'); labelSpan.textContent = 'IDR\x20'; const amountSpan = document.createElement('span'); amountSpan.id = 'jackpot-amount'; amountSpan.textContent = '97.849.894.897'; // Nilai awal awal textLabelRow.appendChild(labelSpan); textLabelRow.appendChild(amountSpan); jackpotBox.appendChild(textLabelRow); container.appendChild(jackpotBox); // Menyisipkan sebelum slider utama banner const mainSlider = document.querySelector('#main-slider'); if (mainSlider) { mainSlider.parentNode.insertBefore(container, mainSlider); } // Fungsi memformat angka biasa menjadi format ribuan (Contoh: 1000000 -> 1.000.000) function formatRibuan(angka) { return angka.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.'); } // Simulasi Counter: Angka bertambah terus secara real-time let currentJackpotValue = 97849894897; setInterval(() => { currentJackpotValue += Math.floor(Math.random() * 2000) + 1000; // Ditambah angka acak antara 1000 - 3000 const liveCounterDisplay = document.getElementById('jackpot-amount'); if (liveCounterDisplay) { liveCounterDisplay.textContent = formatRibuan(currentJackpotValue); } }, 100); }); document.addEventListener('DOMContentLoaded', function () { // Data konfigurasi tombol floating const floatingButtons = [ { href: '/', src: '#', alt: 'BUKTI JP LAMBE100', className: 'BUKTIJPLAMBE' }, { href: '/rtp', src: '#', alt: 'RTP LAMBE100', className: 'RTPLAMBE100' }, { href: '#', src: '#', alt: 'PREDIKSI LAMBE100', className: 'btn-add2' } ]; floatingButtons.forEach((btn, index) => { const btnContainer = document.createElement('div'); btnContainer.style.position = 'fixed'; btnContainer.style.right = '5px'; // Menempel di kanan layar btnContainer.style.zIndex = '1'; btnContainer.style.bottom = 'all'; btnContainer.style.top = (46 + index * 46) + 'px'; // Memberikan jarak vertikal antar tombol agar tidak menumpuk const linkAnchor = document.createElement('a'); linkAnchor.href = btn.href; linkAnchor.target = '_blank'; // Membuka di tab baru linkAnchor.rel = 'noopener'; const imgElement = document.createElement('img'); imgElement.src = btn.src; imgElement.alt = btn.alt; imgElement.className = btn.className; imgElement.width = 75; imgElement.height = 75; linkAnchor.appendChild(imgElement); btnContainer.appendChild(linkAnchor); document.body.appendChild(btnContainer); // Disuntikkan langsung ke body utama }); });