Download index.html from ServerX/game.onl: direct link, hf CLI and curl.
- Browser
- Download file 5.9 kB
-
https://huggingface.co/spaces/ServerX/game.onl/resolve/main/index.html
- Command line
-
hf download hf://spaces/ServerX/game.onl/index.html
-
curl -L -o index.html https://huggingface.co/spaces/ServerX/game.onl/resolve/main/index.html
5.9 kB
| <html lang="it"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <title>Gam.onl No Ads Premium</title> | |
| <style> | |
| /* Stili di base */ | |
| body, html { | |
| margin: 0; | |
| padding: 0; | |
| width: 100%; | |
| height: 100%; | |
| overflow: hidden; | |
| background: #000; | |
| font-family: Arial, sans-serif; | |
| } | |
| #gameContainer { | |
| position: fixed; | |
| width: 100%; | |
| height: 100%; | |
| border: none; | |
| visibility: hidden; | |
| } | |
| #loader { | |
| position: fixed; | |
| top: 50%; | |
| left: 50%; | |
| transform: translate(-50%, -50%); | |
| color: white; | |
| font-size: 16px; | |
| } | |
| /* Overlay che blocca la zona dove compare la ricerca */ | |
| #searchBlocker { | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100px; /* Regola questa altezza in base alle tue necessità */ | |
| z-index: 10000; | |
| background: transparent; | |
| } | |
| /* Nascondi eventuali pulsanti di ricerca presenti fuori dall'iframe */ | |
| .menu-search, .gsc-control-cse { | |
| display: none ; | |
| } | |
| </style> | |
| <script> | |
| // Override delle funzioni di ricerca (se presenti) | |
| function showhide1() { return false; } | |
| function showhide() { return false; } | |
| </script> | |
| </head> | |
| <body> | |
| <div id="loader">Caricamento in corso...</div> | |
| <!-- Overlay per bloccare la zona della ricerca --> | |
| <div id="searchBlocker"></div> | |
| <!-- Iframe che carica gam.onl --> | |
| <iframe id="gameContainer" sandbox="allow-scripts allow-same-origin allow-forms allow-popups allow-modals allow-pointer-lock"></iframe> | |
| <script> | |
| (function() { | |
| const iframe = document.getElementById('gameContainer'); | |
| const loader = document.getElementById('loader'); | |
| // Configurazione per il blocco avanzato degli annunci | |
| const adBlockConfig = { | |
| scripts: [ | |
| /adservice|adsystem|doubleclick|googletag|adserver|advert|tracking|analytics/gi, | |
| /nannyirrationalacquainted|prosecutorremarkablegodforsaken|recordedthereby/gi | |
| ], | |
| elements: [ | |
| 'div[class*="ad"]', | |
| 'iframe[src*="ads"]', | |
| 'ins.adsbygoogle', | |
| '#___gcse_0', | |
| '.gsc-adBlock', | |
| '[id*="ad-container"]', | |
| '[class*="banner"]' | |
| ], | |
| cssRules: [ | |
| '{display:none!important;height:0!important;width:0!important;opacity:0!important;visibility:hidden!important}' | |
| ] | |
| }; | |
| // Funzione per rimuovere gli annunci nell'iframe | |
| function nuclearAdBlock() { | |
| try { | |
| const iframeDoc = iframe.contentDocument || iframe.contentWindow.document; | |
| if (!iframeDoc) return; | |
| // Rimuove script sospetti | |
| iframeDoc.querySelectorAll('script').forEach(script => { | |
| if (adBlockConfig.scripts.some(regex => regex.test(script.src))) { | |
| script.remove(); | |
| } | |
| }); | |
| // Rimuove elementi indesiderati | |
| adBlockConfig.elements.forEach(selector => { | |
| iframeDoc.querySelectorAll(selector).forEach(el => el.remove()); | |
| }); | |
| // Iniezione CSS per nascondere eventuali residui, se non già presente | |
| if (!iframeDoc.getElementById('nuclear-adblock-style')) { | |
| const style = iframeDoc.createElement('style'); | |
| style.id = 'nuclear-adblock-style'; | |
| style.textContent = adBlockConfig.elements.join(',') + adBlockConfig.cssRules.join(','); | |
| iframeDoc.head.appendChild(style); | |
| } | |
| } catch(e) { | |
| console.error('Advanced Adblock Error:', e); | |
| } | |
| } | |
| // Funzione per intercettare la navigazione interna e forzarla a rimanere nell'iframe | |
| function handleNavigation() { | |
| try { | |
| const iframeDoc = iframe.contentDocument || iframe.contentWindow.document; | |
| if (!iframeDoc) return; | |
| // Forza tutti i link ad aprirsi nello stesso iframe | |
| iframeDoc.querySelectorAll('a').forEach(anchor => { | |
| if (anchor.getAttribute('target') === '_blank') { | |
| anchor.setAttribute('target', '_self'); | |
| } | |
| }); | |
| // Intercetta il click sui link per ricaricare il contenuto nell'iframe | |
| iframeDoc.body.addEventListener('click', function(e) { | |
| const anchor = e.target.closest('a'); | |
| if (anchor && anchor.href) { | |
| e.preventDefault(); | |
| iframe.src = anchor.href; | |
| } | |
| }, true); | |
| } catch(e) { | |
| console.warn("handleNavigation error:", e); | |
| } | |
| } | |
| // Inizializzazione: carica gam.onl nell'iframe | |
| iframe.src = 'https://gam.onl'; | |
| iframe.onload = () => { | |
| try { | |
| nuclearAdBlock(); | |
| handleNavigation(); | |
| iframe.style.visibility = 'visible'; | |
| loader.style.display = 'none'; | |
| // Configura MutationObserver per aggiornare continuamente il blocco annunci e la navigazione | |
| const iframeDoc = iframe.contentDocument || iframe.contentWindow.document; | |
| if (iframeDoc) { | |
| const observer = new MutationObserver(() => { | |
| nuclearAdBlock(); | |
| handleNavigation(); | |
| }); | |
| observer.observe(iframeDoc.body, { childList: true, subtree: true }); | |
| } | |
| } catch(e) { | |
| console.error("Errore durante l'onload:", e); | |
| } | |
| }; | |
| // Fallback: esegui periodicamente il blocco annunci | |
| setInterval(nuclearAdBlock, 3000); | |
| // Protezione aggiuntiva: blocca eventuali messaggi in ingresso | |
| window.addEventListener('message', e => { | |
| if(e.data.type === 'ad' || e.data.adContent) { | |
| e.stopImmediatePropagation(); | |
| } | |
| }); | |
| })(); | |
| </script> | |
| </body> | |
| </html> | |