diff --git a/public/index.html b/public/index.html
index 500471c..e95120a 100644
--- a/public/index.html
+++ b/public/index.html
@@ -37,7 +37,7 @@
Home
Settings
Selenite Discord
- Open Blank
+ Open Blank
selenite
diff --git a/public/index.js b/public/index.js
index 64e0552..fd9e41f 100644
--- a/public/index.js
+++ b/public/index.js
@@ -37,3 +37,16 @@ form.addEventListener("submit", async (event) => {
frame.style.display = "block";
frame.src = __uv$config.prefix + __uv$config.encodeUrl(url);
});
+document.getElementById("blank").addEventListener("click", () => {
+ let win = window.open();
+ win.document.body.style.margin = "0";
+ win.document.body.style.height = "100vh";
+ let html = `
+ `;
+ win.document.querySelector("html").innerHTML = html;
+ win.eval(`let selenite = document.getElementById("selenite");console.log(selenite);selenite.setAttribute("src", "${location.origin}");console.log(selenite);document.getElementById("goBack").addEventListener("click", function () {selenite.contentDocument.location.href = selenite.contentDocument.location.origin;});document.getElementById("reload").addEventListener("click", function () {selenite.contentDocument.location.href = selenite.contentDocument.location.href;})`);
+ location.href = "https://google.com";
+ close();
+});
+
diff --git a/src/index.js b/src/index.js
index 60f7f30..2b1c2cf 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,3 +1,37 @@
+let links;
+import path from 'node:path';
+import fs from 'node:fs';
+import { fileURLToPath } from 'node:url';
+import { dirname } from 'node:path';
+
+const __filename = fileURLToPath(import.meta.url);
+const __dirname = dirname(__filename);
+const filePath = path.join(__dirname, "api/some.pass");
+fs.readFile(filePath, "utf8", (err, data) => {
+ if (err) {
+ console.error(err);
+ return;
+ }
+ try {
+ links = Object.keys(JSON.parse(data));
+ } catch (err) {
+ console.error("Error parsing JSON:", err);
+ }
+});
+fs.watch(filePath, () => {
+ fs.readFile(filePath, "utf8", (err, data) => {
+ if (err) {
+ console.error(err);
+ return;
+ }
+ try {
+ links = Object.keys(JSON.parse(data));
+ console.log("file change");
+ } catch (err) {
+ console.error("Error parsing JSON:", err);
+ }
+ });
+});
import express from "express";
import { createServer } from "node:http";
import { uvPath } from "@titaniumnetwork-dev/ultraviolet";
@@ -22,6 +56,13 @@ app.post("/api/addLink", (req, res) => {
res.sendStatus(401);
}
});
+app.use("/check", (req, res) => {
+ if(links.includes(req.query.domain)) {
+ res.sendStatus(200);
+ } else {
+ res.sendStatus(404);
+ }
+});
app.use((req, res, next) => {
if (!checkPass(req)) {
res.send("");