Files
backend/html/admin.html
2025-10-26 18:48:17 -04:00

63 lines
1.9 KiB
HTML
Executable File

<!DOCTYPE html>
<html lang="en">
<head>
<!-- initialize theme vars
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->
<!-- initialize externals -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "Selenite",
"alternateName": "selenite.cc",
"url": "https://selenite.cc",
"logo": "https://selenite.cc/favicon.png",
"sameAs": [
"https://github.com/selenite-cc",
"https://youtube.com/@selenitecc",
"https://tiktok.com/@selenitecc",
"https://selenite.cc",
]
}
</script>
<!-- initialize my stuff -->
<script src="/js/all.js"></script>
<script src="/js/main.js"></script>
<link rel="stylesheet" href="/css/main.css" />
<link rel="stylesheet" href="/css/pages.css" />
<link rel="manifest" href="/manifest.json" />
<!-- seo + other things -->
<title>Selenite</title>
<link rel="icon" href="/favicon.ico" />
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3415518411898563" crossorigin="anonymous"></script>
<script>
function sendAnnouncement() {
let title = prompt("title");
let message = prompt("message");
if(prompt("are you sure (y/N)") == "y") {
let cookies = document.cookie.split("; ");
for (let i = 0; i < cookies.length; i++) {
if (cookies[i].trim().startsWith("token=")) {
let socket = new WebSocket("/socket");
socket.addEventListener("open", () => {
socket.send(`annc;;${cookies[i].trim().split("=")[1]};;${title};;${message}`);
})
}
}
}
}
</script>
</head>
<alerts> </alerts>
<body>
<h1 class="title">admin page</h1>
<sections>
<button onclick="sendAnnouncement()">send announcement</button>
</sections>
</body>
</html>