let popupWindow = null;
// === Load Poppins Font ===const fontLink = document.createElement('link');fontLink.rel = 'stylesheet';fontLink.href = 'https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap';document.head.appendChild(fontLink);
// === Function to open the popup ===function openPopup() { if (!popupWindow || popupWindow.closed) { popupWindow = window.open( 'https://sites.google.com/view/ifyoureadthisurgayburgedu/home?authuser=0', 'MiniGOONSBURG', 'width=500,height=400,left=100,top=100' ); } else { popupWindow.focus(); }}
// === GREEN OPEN BUTTON ===const openBtn = document.createElement('button');openBtn.textContent = 'Open';Object.assign(openBtn.style, { position: 'fixed', bottom: '20px', right: '140px', padding: '10px 15px', borderRadius: '5px', background: '#28a745', color: '#fff', border: 'none', cursor: 'pointer', zIndex: '9999', fontFamily: "'Poppins', sans-serif", fontWeight: '600'});openBtn.onclick = openPopup;document.body.appendChild(openBtn);
// === RED CLOSE BUTTON ===const closeBtn = document.createElement('button');closeBtn.textContent = 'Close';Object.assign(closeBtn.style, { position: 'fixed', bottom: '20px', right: '20px', padding: '10px 15px', borderRadius: '5px', background: '#dc3545', color: '#fff', border: 'none', cursor: 'pointer', zIndex: '9999', fontFamily: "'Poppins', sans-serif", fontWeight: '600'});closeBtn.onclick = () => { if (popupWindow && !popupWindow.closed) { popupWindow.close(); }};document.body.appendChild(closeBtn);
// === TINY HIDE CONTROLS BUTTON ===const hideControlsBtn = document.createElement('button');hideControlsBtn.textContent = '☰';Object.assign(hideControlsBtn.style, { position: 'fixed', top: '10px', right: '10px', padding: '4px 8px', fontSize: '14px', borderRadius: '3px', background: '#444', color: '#fff', border: 'none', cursor: 'pointer', zIndex: '9999', fontFamily: "'Poppins', sans-serif", fontWeight: '600', opacity: '0.7'});let controlsHidden = false;hideControlsBtn.onclick = () => { controlsHidden = !controlsHidden; openBtn.style.display = controlsHidden ? 'none' : 'block'; closeBtn.style.display = controlsHidden ? 'none' : 'block'; hideControlsBtn.textContent = controlsHidden ? '🔓' : '☰';};document.body.appendChild(hideControlsBtn);
// === SHIFT + E to open MiniGOONSBURG ===document.addEventListener('keydown', (e) => { if (e.shiftKey && e.key.toLowerCase() === 'e') { openPopup(); }});
// === Always-on-top behavior ===document.addEventListener('click', () => { if (popupWindow && !popupWindow.closed) { popupWindow.focus(); }});
// === MiniGOONSBURG Help Overlay ===const helpOverlay = document.createElement('div');Object.assign(helpOverlay.style, { position: 'fixed', top: '0', left: '0', width: '100vw', height: '100vh', background: 'rgba(0,0,0,0.85)', color: '#fff', zIndex: '9998', display: 'flex', flexDirection: 'column', justifyContent: 'center', alignItems: 'center', fontFamily: "'Poppins', sans-serif", padding: '40px', textAlign: 'center'});
// === Add GB Logo (Updated) ===const logoImg = document.createElement('img');logoImg.src = 'https://lh5.googleusercontent.com/-nY33VR0D5itiMSXc4B5u3T1HLwm2galEelBBVS794Btf8OuylG3Pt-p5CKmzXPPTcPoXRSOiTHOHvvD4IiilmZwrTJ-m5-RYc7d_O7Am_s032qmCPI6jelJeqGnWIPsa7tsDVXR5w=w16383';logoImg.alt = 'MiniGOONSBURG Logo';Object.assign(logoImg.style, { width: '120px', height: '120px', borderRadius: '50%', marginBottom: '20px', animation: 'float 2s infinite alternate'});helpOverlay.appendChild(logoImg);
// === Animated Text ===const animatedText = document.createElement('div');animatedText.innerHTML = ` <h1 style="font-size: 2.2em; font-weight: 700; margin-bottom: 20px; animation: float 2s infinite alternate;">Welcome to MiniGOONSBURG™</h1> <p style="font-size: 1.1em; font-weight: 400; line-height: 1.6;"> 🟢 <strong>Open Button</strong> launches the MiniGOONSBURG popup.<br><br> 🔴 <strong>Close Button</strong> shuts it down.<br><br> ⌨️ Press <strong>Shift + E</strong> anytime to open it instantly.<br><br> 📌 Popup stays on top—even if you click around.<br><br> ☰ <strong>Hide Controls</strong> button (top-right corner) lets you toggle visibility of the Open/Close buttons.<br><br> 🔓 When hidden, click the 🔓 icon to bring them back.<br><br> ⚠️ If you click something that redirects you, just paste the code into the console to open back up MiniGOONSBURG.<br><br> 💡 This overlay is just a guide. Click below to close it. </p>`;helpOverlay.appendChild(animatedText);
// === Close Help Button ===const helpCloseBtn = document.createElement('button');helpCloseBtn.textContent = 'Close Guide';Object.assign(helpCloseBtn.style, { marginTop: '30px', padding: '10px 20px', borderRadius: '5px', background: '#007bff', color: '#fff', border: 'none', cursor: 'pointer', fontFamily: "'Poppins', sans-serif", fontWeight: '600'});helpCloseBtn.onclick = () => { helpOverlay.remove();};helpOverlay.appendChild(helpCloseBtn);
// === Add animation style ===const style = document.createElement('style');style.textContent = ` @keyframes float { 0% { transform: translateY(0px); } 100% { transform: translateY(-10px); } }`;document.head.appendChild(style);
// === Show Help Overlay on Load ===document.body.appendChild(helpOverlay);