From 9bda410a09364094a20f79084144951a2034e6d9 Mon Sep 17 00:00:00 2001 From: Bubbo <85169821+xbubbo@users.noreply.github.com> Date: Tue, 26 Nov 2024 18:54:18 +0000 Subject: [PATCH] 5.2.6 - Removed ads --- config.js | 4 ---- index.js | 33 --------------------------------- static/404.html | 2 +- static/apps.html | 2 +- static/assets/js/m.js | 4 ++-- static/games.html | 2 +- static/index.html | 2 +- static/settings.html | 2 +- static/tabs.html | 2 +- 9 files changed, 8 insertions(+), 45 deletions(-) diff --git a/config.js b/config.js index 0538485aa..94ef42b83 100644 --- a/config.js +++ b/config.js @@ -1,9 +1,5 @@ const config = { challenge: false, // Set to true if you want to enable password protection. - blocked: { - // Normal users can ignore this option. This is for the owner of the website. - "gointerstellar.app": "", - }, users: { // You can add multiple users by doing username: 'password'. interstellar: "password", diff --git a/index.js b/index.js index 4a53224c4..0e2af7336 100644 --- a/index.js +++ b/index.js @@ -94,39 +94,6 @@ app.use(express.urlencoded({ extended: true })); setupMasqr(app); } */ -const blocked = Object.keys(config.blocked); - -app.get("/assets/js/m.js", (req, res) => { - const hostname = req.hostname; - - const isBlocked = blocked.some(domain => { - if (hostname === domain) return true; - return hostname.endsWith(`.${domain}`); - }); - - const main = path.join(__dirname, "static/assets/js/m.js"); - - // console.log(`Checking hostname: ${hostname}, Blocked: ${isBlocked}`); - - try { - if (isBlocked) { - fs.readFile(main, "utf8", (err, data) => { - if (err) { - console.error("Error reading the file:", err); - return res.status(500).send("Something went wrong."); - } - const script = data.split("\n").slice(9).join("\n"); - res.type("application/javascript").send(script); - }); - } else { - res.sendFile(main); - } - } catch (error) { - console.error("There was an error processing the script:", error); - res.status(500).send("Something went wrong."); - } -}); - app.use(express.static(path.join(__dirname, "static"))); app.use("/fq", cors({ origin: true })); diff --git a/static/404.html b/static/404.html index f432346cc..0bf6300e4 100644 --- a/static/404.html +++ b/static/404.html @@ -43,5 +43,5 @@

Page not found.

- + diff --git a/static/apps.html b/static/apps.html index f94c9b0b7..f6936942d 100644 --- a/static/apps.html +++ b/static/apps.html @@ -51,7 +51,7 @@
- + - + - + + - +