Update scheduled to release friday, monday at the latest.
// ==========================================
// === ⚙️ SETTINGS: PASTE YOUR LOGO HERE ===
// ==========================================
// 1. Upload your image to Imgur.com
// 2. Copy the "Direct Link" (ending in .png or .jpg)
// 3. Paste it between the quotes below:
const LOGO_URL = 'https://i.imgur.com/P1WdKkM.png';
// ^ I put a placeholder trident here. Replace it with your link!
// ==========================================
// === 🚀 START OF SCRIPT ===
// ==========================================
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/atlantis-hub/home',
'AtlantisHub',
'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 ===
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();
}
});
// === Atlantis Hub 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 Logo (Uses the variable from the top) ===
const logoImg = document.createElement('img');
logoImg.src = LOGO_URL;
logoImg.alt = 'Atlantis Hub Logo';
Object.assign(logoImg.style, {
width: '150px', // Made it slightly larger for better visibility
height: '150px',
borderRadius: '50%',
marginBottom: '20px',
objectFit: 'cover', // Ensures the image isn't squished
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 Atlantis Hub</h1>
<p style="font-size: 1.1em; font-weight: 400; line-height: 1.6;">
🟢 <strong>Open Button</strong> launches the Atlantis Hub 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 Atlantis Hub.<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);