first commit
This commit is contained in:
96
html/admin.html
Executable file
96
html/admin.html
Executable file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="sl-theme-dark" lang="en">
|
||||
<head>
|
||||
<!-- initialize theme vars
|
||||
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->
|
||||
|
||||
<!-- initialize externals -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
|
||||
<script src=" https://cdn.jsdelivr.net/npm/js-cookie@3.0.5/dist/js.cookie.min.js "></script>
|
||||
|
||||
<!-- initialize my stuff -->
|
||||
<script src="/js/all.min.js"></script>
|
||||
<script src="/js/main.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
|
||||
<!-- seo + other things -->
|
||||
<title>Profile</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</head>
|
||||
<alerts> </alerts>
|
||||
<body id="noscroll">
|
||||
<header>
|
||||
<a href="/index.html">Home</a>
|
||||
<a href="/bookmarklets.html">Bookmarklets</a>
|
||||
<a href="/projects.html">Games</a>
|
||||
<a href="/apps.html">Apps</a>
|
||||
<a href="/settings.html">Settings</a>
|
||||
<a id="blank" href="#">Open Blank</a>
|
||||
<a href="/u/" class="usericon"><img src="/img/user.svg" /></a>
|
||||
</header>
|
||||
<script>
|
||||
async function addBadge() {
|
||||
let name = prompt("username");
|
||||
let badge = prompt("badge name");
|
||||
|
||||
let run = await fetch("/api/admin/badge", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
username: name,
|
||||
badge: badge
|
||||
}),
|
||||
headers: {
|
||||
"Content-type": "application/json; charset=UTF-8",
|
||||
},
|
||||
});
|
||||
alert(JSON.stringify(run));
|
||||
}
|
||||
function announce() {
|
||||
let key = prompt("enter key");
|
||||
let announcement = prompt("enter announcement");
|
||||
socket.send(`${key}.${announcement}`)
|
||||
}
|
||||
async function removeAccount() {
|
||||
let name = prompt("enter username");
|
||||
let run = await fetch("/api/admin/removeAcc", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
username: name
|
||||
}),
|
||||
headers: {
|
||||
"Content-type": "application/json; charset=UTF-8",
|
||||
},
|
||||
});
|
||||
}
|
||||
async function ban() {
|
||||
let name = prompt("enter username");
|
||||
let reason = prompt("enter reason");
|
||||
let run = await fetch("/api/admin/ban", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
name: name,
|
||||
reason: reason,
|
||||
}),
|
||||
headers: {
|
||||
"Content-type": "application/json; charset=UTF-8",
|
||||
},
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<main>
|
||||
<button onclick="addBadge()">Add a badge</button>
|
||||
<button onclick="announce()">Send announcement</button>
|
||||
<button onclick="removeAccount()">remove account</button>
|
||||
<button onclick="ban()">ban account</button>
|
||||
</main>
|
||||
<footer class="noscroll">
|
||||
<a href="https://gitlab.com/skysthelimit.dev/selenite">Source</a>
|
||||
<a href="https://discord.gg/7jyufnwJNf">Discord</a>
|
||||
<a href="/suggest.html">Suggestions & Bugs</a>
|
||||
<a href="/contact.html">Contact</a>
|
||||
<a href="/support.html">Donate</a>
|
||||
<a href="/about.html">About</a>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
64
html/ai.html
Executable file
64
html/ai.html
Executable file
@ -0,0 +1,64 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="sl-theme-dark" lang="en">
|
||||
<head>
|
||||
<!-- initialize theme vars
|
||||
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->
|
||||
|
||||
<!-- initialize externals -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
|
||||
<script src=" https://cdn.jsdelivr.net/npm/js-cookie@3.0.5/dist/js.cookie.min.js "></script>
|
||||
|
||||
<!-- initialize my stuff -->
|
||||
<script src="/js/all.min.js"></script>
|
||||
<script src="/js/main.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/dompurify/3.1.6/purify.min.js" integrity="sha512-jB0TkTBeQC9ZSkBqDhdmfTv1qdfbWpGE72yJ/01Srq6hEzZIz2xkz1e57p9ai7IeHMwEG7HpzG6NdptChif5Pg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
|
||||
<!-- seo + other things -->
|
||||
<title>AI | Selenite</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<script>
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<alerts> </alerts>
|
||||
<body id="noscroll">
|
||||
<header>
|
||||
<a href="/index.html">Home</a>
|
||||
<a href="/bookmarklets.html">Bookmarklets</a>
|
||||
<a href="/projects.html">Games</a>
|
||||
<a href="/apps.html">Apps</a>
|
||||
<a href="/settings.html">Settings</a>
|
||||
<a id="blank" href="#">Open Blank</a>
|
||||
<a href="/u/" class="usericon"><img src="/img/user.svg" /></a>
|
||||
</header>
|
||||
<script></script>
|
||||
<main>
|
||||
<h1>AI Chat Bot</h1>
|
||||
<p>Powered by <a href="https://groq.com">Groq</a>.</p>
|
||||
<p class="evensmaller">Messages are logged for quality assurance. Don't type any personal information.</p>
|
||||
<select id="models">
|
||||
<option>Select a model:</option>
|
||||
<option value="average">Average (Recommended)</option>
|
||||
<option value="dumb">Dumb (but fast)</option>
|
||||
<option value="genius">Genius (but slow)</option>
|
||||
</select>
|
||||
<div id="chat">
|
||||
<div id="messages">
|
||||
</div>
|
||||
<div class="messagebox">
|
||||
<input type="text" placeholder="Send a message..." id="chatbox" />
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<footer class="noscroll">
|
||||
<a href="https://gitlab.com/skysthelimit.dev/selenite">Source</a>
|
||||
<a href="https://discord.gg/7jyufnwJNf">Discord</a>
|
||||
<a href="/suggest.html">Suggestions & Bugs</a>
|
||||
<a href="/contact.html">Contact</a>
|
||||
<a href="/support.html">Donate</a>
|
||||
<a href="/about.html">About</a>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
100
html/login.html
Executable file
100
html/login.html
Executable file
@ -0,0 +1,100 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="sl-theme-dark" lang="en">
|
||||
<head>
|
||||
<!-- initialize theme vars
|
||||
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->
|
||||
|
||||
<!-- initialize externals -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
|
||||
<script src=" https://cdn.jsdelivr.net/npm/js-cookie@3.0.5/dist/js.cookie.min.js "></script>
|
||||
|
||||
<!-- initialize my stuff -->
|
||||
<script src="/js/all.min.js"></script>
|
||||
<script src="/js/main.js"></script>
|
||||
|
||||
<script src="https://js.hcaptcha.com/1/api.js" async defer></script>
|
||||
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
|
||||
<!-- seo + other things -->
|
||||
<title>Login | Selenite</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
document.getElementById("login").addEventListener("submit", async (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
let username = document.getElementById("username").value;
|
||||
let password = document.getElementById("password").value;
|
||||
let captcha = document.getElementById("hcaptcha").firstChild.dataset.hcaptchaResponse;
|
||||
|
||||
let data = await (
|
||||
await fetch("/login", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
username: username,
|
||||
password: password,
|
||||
"h-captcha-response": captcha,
|
||||
}),
|
||||
headers: {
|
||||
"Content-type": "application/json; charset=UTF-8",
|
||||
},
|
||||
})
|
||||
).json();
|
||||
if (data.success == true) {
|
||||
console.log("Token: ", data.token);
|
||||
document.cookie = `token=${data.token}; expires=${new Date(new Date().setMonth(new Date().getMonth() + 6)).toUTCString()}; path=/;`;
|
||||
location.href = "/u/";
|
||||
} else {
|
||||
console.log("Error: ", data.reason);
|
||||
document.getElementById("title").innerText = "Failed to login";
|
||||
document.getElementById("reason").innerText = data.reason;
|
||||
document.getElementById("popup").style.display = "flex";
|
||||
hcaptcha.reset();
|
||||
document.getElementById("close").addEventListener("click", () => {
|
||||
document.getElementById("popup").style.display = "none";
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<alerts> </alerts>
|
||||
<body id="noscroll">
|
||||
<header>
|
||||
<a href="/index.html">Home</a>
|
||||
<a href="/bookmarklets.html">Bookmarklets</a>
|
||||
<a href="/projects.html">Games</a>
|
||||
<a href="/apps.html">Apps</a>
|
||||
<a href="/settings.html">Settings</a>
|
||||
<a id="blank" href="#">Open Blank</a>
|
||||
<a href="/u/" class="usericon"><img src="/img/user.svg" /></a>
|
||||
</header>
|
||||
<main id="main" class="noscroll">
|
||||
<h2>Login to your account</h2>
|
||||
<form onsubmit="return false;" id="login">
|
||||
<input type="text" id="username" placeholder="username" />
|
||||
<input type="password" id="password" placeholder="password" />
|
||||
<br />
|
||||
<a href="/reset">Forgot password?</a> or <a href="/register">Create a free account</a><br />
|
||||
<div class="h-captcha" id="hcaptcha" data-sitekey="1774ec96-39be-4fb0-9e82-f4c62354b8fa"></div>
|
||||
<button type="submit" value="Submit">Login</button>
|
||||
</form>
|
||||
</main>
|
||||
<popups>
|
||||
<div id="popup" style="display: none">
|
||||
<h1 id="title"></h1>
|
||||
<p id="reason"></p>
|
||||
<button id="close">X</button>
|
||||
</div>
|
||||
</popups>
|
||||
<footer class="noscroll">
|
||||
<a href="https://gitlab.com/skysthelimit.dev/selenite">Source</a>
|
||||
<a href="https://discord.gg/7jyufnwJNf">Discord</a>
|
||||
<a href="/suggest.html">Suggestions & Bugs</a>
|
||||
<a href="/contact.html">Contact</a>
|
||||
<a href="/support.html">Donate</a>
|
||||
<a href="/about.html">About</a>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
67
html/profile.html
Executable file
67
html/profile.html
Executable file
@ -0,0 +1,67 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="sl-theme-dark" lang="en">
|
||||
<head>
|
||||
<!-- initialize theme vars
|
||||
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->
|
||||
|
||||
<meta content="{{ name }}" property="og:title" />
|
||||
<meta content="{{ about_none }}" property="og:description" />
|
||||
<meta content="{{ user_pfp }}" property="og:image" />
|
||||
<meta content="#c77dff" data-react-helmet="true" name="theme-color" />
|
||||
<!-- initialize externals -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
|
||||
<script src=" https://cdn.jsdelivr.net/npm/js-cookie@3.0.5/dist/js.cookie.min.js "></script>
|
||||
|
||||
<!-- initialize my stuff -->
|
||||
<script src="/js/all.min.js"></script>
|
||||
<script src="/js/main.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
|
||||
<!-- seo + other things -->
|
||||
<style>{{ custom_css }}</style>
|
||||
<title>{{ name }}'s Profile | Selenite</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</head>
|
||||
<alerts> </alerts>
|
||||
<body class="profile">
|
||||
<header>
|
||||
<a href="/index.html">Home</a>
|
||||
<a href="/bookmarklets.html">Bookmarklets</a>
|
||||
<a href="/projects.html">Games</a>
|
||||
<a href="/apps.html">Apps</a>
|
||||
<a href="/settings.html">Settings</a>
|
||||
<a id="blank" href="#">Open Blank</a>
|
||||
<a href="/u/" class="usericon"><img src="/img/user.svg" /></a>
|
||||
</header>
|
||||
<main>
|
||||
<div class="profile top">
|
||||
<img src="{{ user_pfp }}" class="pfp" />
|
||||
<div class="profile top text">
|
||||
<h1>{{ name }}</h1>
|
||||
<div class="samerow">{{ badges }}</div>
|
||||
<h2>Joined {{ join_date }}</h2>
|
||||
<h2>Last online {{ online_time }}</h2>
|
||||
</div>
|
||||
<div class="profile top text right">
|
||||
<h1>About Me</h1>
|
||||
<h2 class="about">{{ about }}</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="profile played">
|
||||
<h2>Top Games:</h2>
|
||||
<div id="played-games">
|
||||
{{ played_games }}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<footer>
|
||||
<a href="https://gitlab.com/skysthelimit.dev/selenite">Source</a>
|
||||
<a href="https://discord.gg/7jyufnwJNf">Discord</a>
|
||||
<a href="/suggest.html">Suggestions & Bugs</a>
|
||||
<a href="/contact.html">Contact</a>
|
||||
<a href="/support.html">Donate</a>
|
||||
<a href="/about.html">About</a>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
70
html/profile_404.html
Executable file
70
html/profile_404.html
Executable file
@ -0,0 +1,70 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="sl-theme-dark" lang="en">
|
||||
<head>
|
||||
<!-- initialize theme vars
|
||||
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->
|
||||
|
||||
<!-- initialize externals -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
|
||||
<script src=" https://cdn.jsdelivr.net/npm/js-cookie@3.0.5/dist/js.cookie.min.js "></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- initialize my stuff -->
|
||||
<script src="/js/all.min.js"></script>
|
||||
<script src="/js/main.js"></script>
|
||||
<script src="/js/widget.js"></script>
|
||||
<script src="/js/themes.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- seo + other things -->
|
||||
<title>Profile not found | Selenite</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
|
||||
</head>
|
||||
<alerts>
|
||||
|
||||
</alerts>
|
||||
<body id="noscroll">
|
||||
<header>
|
||||
<a href="/index.html">Home</a>
|
||||
<a href="/bookmarklets.html">Bookmarklets</a>
|
||||
<a href="/projects.html">Games</a>
|
||||
<a href="/apps.html">Apps</a>
|
||||
<a href="/settings.html">Settings</a>
|
||||
<a id="blank" href="#">Open Blank</a>
|
||||
<a href="/u/" class="usericon"><img src="/img/user.svg"></a>
|
||||
|
||||
</header>
|
||||
<main id="main" class="noscroll">
|
||||
<h1>Profile not found!</h1>
|
||||
<p>Maybe you clicked a wrong link? This profile doesn't seem to exist.</p>
|
||||
<a href="/index.html"><button>Go home</button></a>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
"innerText"in document.body||Object.defineProperty(HTMLElement.prototype,"innerText",{get:function(){return this.textContent},set:function(a){this.textContent=a}}),window.fetch||(window.fetch=function(a){return new Promise(function(b,c){var d=new XMLHttpRequest;d.open("GET",a),d.onload=function(){200===d.status?b(JSON.parse(d.responseText)):c(Error(d.statusText))},d.onerror=function(){c(Error("Network Error"))},d.send()})}),window.XMLHttpRequest||(window.XMLHttpRequest=function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(a){}throw new Error("This browser does not support XMLHttpRequest.")});function statsForNerds(){var a=document.getElementById("sfn");"none"===a.style.display?(a.style.display="block",console.log("[\u2139\uFE0F] Showing the stats for nerds!")):(a.style.display="none",console.log("[\u2139\uFE0F] Hiding the stats for nerds!"))}document.getElementById("full").innerText=window.location.href,document.getElementById("ref").innerHTML=document.referrer,document.getElementById("title").innerText=document.title,document.getElementById("height").innerHTML=screen.height+"px",document.getElementById("width").innerHTML=screen.width+"px",document.getElementById("winheight").innerHTML=window.innerHeight+"px",document.getElementById("winwidth").innerHTML=window.innerWidth+"px",document.getElementById("cookie").innerText=navigator.cookieEnabled,document.getElementById("ua").innerHTML=navigator.userAgent,document.getElementById("plat").innerHTML=navigator.platform,document.getElementById("online").innerHTML=navigator.onLine;var echolog={};fetch("//wtfismyip.com/json").then(function(a){return a.json()}).then(function(a){var b={ipAddress:a.YourFuckingIPAddress,hostname:a.YourFuckingHostname},c=document.getElementById("ip");c.innerText=b.ipAddress})["catch"](function(a){return console.error(a)});
|
||||
</script>
|
||||
|
||||
</main>
|
||||
|
||||
<footer class="noscroll">
|
||||
<a href="https://gitlab.com/skysthelimit.dev/selenite">Source</a>
|
||||
<a href="https://discord.gg/7jyufnwJNf">Discord</a>
|
||||
<a href="/suggest.html">Suggestions & Bugs</a>
|
||||
<a href="/contact.html">Contact</a>
|
||||
<a href="/support.html">Donate</a>
|
||||
<a href="/about.html">About</a>
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
59
html/profile_ban.html
Executable file
59
html/profile_ban.html
Executable file
@ -0,0 +1,59 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="sl-theme-dark" lang="en">
|
||||
<head>
|
||||
<!-- initialize theme vars
|
||||
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->
|
||||
|
||||
<meta content="{{ name }}" property="og:title" />
|
||||
<meta content="{{ about_none }}" property="og:description" />
|
||||
<meta content="{{ user_pfp }}" property="og:image" />
|
||||
<meta content="#c77dff" data-react-helmet="true" name="theme-color" />
|
||||
<!-- initialize externals -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
|
||||
<script src=" https://cdn.jsdelivr.net/npm/js-cookie@3.0.5/dist/js.cookie.min.js "></script>
|
||||
|
||||
<!-- initialize my stuff -->
|
||||
<script src="/js/all.min.js"></script>
|
||||
<script src="/js/main.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
|
||||
<title>Banned Profile | Selenite</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<script>
|
||||
function delete_cookie(name, path, domain) {
|
||||
document.cookie = name + "=" + (path ? ";path=" + path : "") + (domain ? ";domain=" + domain : "") + ";expires=Thu, 01 Jan 1970 00:00:01 GMT";
|
||||
}
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
document.getElementById("logout").addEventListener("click", () => {
|
||||
delete_cookie("token", "/", location.hostname);
|
||||
location.reload();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<alerts> </alerts>
|
||||
<body id="noscroll" class="profile">
|
||||
<header>
|
||||
<a href="/index.html">Home</a>
|
||||
<a href="/bookmarklets.html">Bookmarklets</a>
|
||||
<a href="/projects.html">Games</a>
|
||||
<a href="/apps.html">Apps</a>
|
||||
<a href="/settings.html">Settings</a>
|
||||
<a id="blank" href="#">Open Blank</a>
|
||||
<a href="/u/" class="usericon"><img src="/img/user.svg" /></a>
|
||||
</header>
|
||||
<main>
|
||||
<h2>You have been banned: {{ reason }}</h2>
|
||||
<button id="logout">Log out</button>
|
||||
</main>
|
||||
<footer class="noscroll">
|
||||
<a href="https://gitlab.com/skysthelimit.dev/selenite">Source</a>
|
||||
<a href="https://discord.gg/7jyufnwJNf">Discord</a>
|
||||
<a href="/suggest.html">Suggestions & Bugs</a>
|
||||
<a href="/contact.html">Contact</a>
|
||||
<a href="/support.html">Donate</a>
|
||||
<a href="/about.html">About</a>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
321
html/profile_edit.html
Executable file
321
html/profile_edit.html
Executable file
@ -0,0 +1,321 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="sl-theme-dark" lang="en">
|
||||
<head>
|
||||
<!-- initialize theme vars
|
||||
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->
|
||||
|
||||
<!-- initialize externals -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
|
||||
<script src=" https://cdn.jsdelivr.net/npm/js-cookie@3.0.5/dist/js.cookie.min.js "></script>
|
||||
|
||||
<!-- initialize my stuff -->
|
||||
<script src="/js/all.min.js"></script>
|
||||
<script src="/js/main.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
|
||||
<!-- seo + other things -->
|
||||
<title>{{ name }}'s Profile | Selenite</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<script>
|
||||
let username = "{{ username }}";
|
||||
let userData;
|
||||
(async () => {
|
||||
userData = await (await fetch("/u/raw")).json();
|
||||
})();
|
||||
function readFileAsDataURL(file) {
|
||||
console.log("recieved file");
|
||||
return new Promise((resolve, reject) => {
|
||||
const reader = new FileReader();
|
||||
reader.onload = () => resolve(reader.result);
|
||||
reader.onerror = (error) => reject(error);
|
||||
reader.readAsDataURL(file);
|
||||
});
|
||||
}
|
||||
let currentState;
|
||||
async function setProfile() {
|
||||
console.log(state);
|
||||
let body;
|
||||
if (state == "name") {
|
||||
body = { name: document.getElementById("text").value };
|
||||
} else if (state == "bio") {
|
||||
body = { about: document.getElementById("text").value };
|
||||
} else if (state == "custom") {
|
||||
body = { custom: document.getElementById("text").value };
|
||||
} else if (state == "pfp") {
|
||||
console.log("pfp");
|
||||
let file = document.getElementById("pfp_upload").files[0];
|
||||
if (file.size > 4000000) {
|
||||
file.input = "";
|
||||
return;
|
||||
}
|
||||
const fileData = await readFileAsDataURL(file);
|
||||
console.log("promise finished");
|
||||
body = { pfp: fileData };
|
||||
console.log("body set");
|
||||
} else if (state == "clearpfp") {
|
||||
body = { pfp: "del" };
|
||||
} else if (state == "close") {
|
||||
return;
|
||||
} else if (state == "upload") {
|
||||
body = { data: { cookies: document.cookie, localStorage: JSON.stringify(localStorage) } };
|
||||
let data = await (
|
||||
await fetch("/api/account/upload", {
|
||||
credentials: "include",
|
||||
headers: {
|
||||
"Content-type": "application/json; charset=UTF-8",
|
||||
},
|
||||
body: JSON.stringify(body),
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
})
|
||||
).json();
|
||||
document.getElementById("pfp_upload").style.display = "none";
|
||||
document.getElementById("pfp_reminder").style.display = "none";
|
||||
document.getElementById("body-text").style.display = "none";
|
||||
document.getElementById("counter").style.display = "none";
|
||||
document.getElementById("submit").style.display = "none";
|
||||
if (data.success) {
|
||||
document.getElementById("title").innerText = "Upload successful!";
|
||||
document.getElementById("text").style.display = "none";
|
||||
document.getElementById("popup").style.display = "flex";
|
||||
} else {
|
||||
document.getElementById("title").innerText = "Upload failed. This probably means something bad happened, send an email to support@selenite.cc or ping @skysthelimit.dev";
|
||||
document.getElementById("text").style.display = "none";
|
||||
document.getElementById("popup").style.display = "flex";
|
||||
}
|
||||
return;
|
||||
} else if (state == "download") {
|
||||
let data = await (
|
||||
await fetch("/api/account/load", {
|
||||
credentials: "include",
|
||||
headers: {
|
||||
"Content-type": "application/json; charset=UTF-8",
|
||||
},
|
||||
method: "GET",
|
||||
mode: "cors",
|
||||
})
|
||||
).json();
|
||||
document.getElementById("pfp_upload").style.display = "none";
|
||||
document.getElementById("pfp_reminder").style.display = "none";
|
||||
document.getElementById("body-text").style.display = "none";
|
||||
document.getElementById("counter").style.display = "none";
|
||||
document.getElementById("submit").style.display = "none";
|
||||
if (data.success) {
|
||||
document.getElementById("title").innerText = "Download successful!";
|
||||
document.getElementById("text").style.display = "none";
|
||||
document.getElementById("popup").style.display = "flex";
|
||||
} else {
|
||||
document.getElementById("title").innerText = "Download failed.";
|
||||
document.getElementById("body-text").innerText = data.reason;
|
||||
document.getElementById("body-text").style.display = "flex";
|
||||
document.getElementById("popup").style.display = "flex";
|
||||
}
|
||||
console.log(data);
|
||||
data = JSON.parse(data.data);
|
||||
console.log(document.cookie);
|
||||
let cookies = data.cookies.split("; ");
|
||||
for (let i = 0; i < cookies.length; i++) {
|
||||
let cookieData = cookies[i].split("=");
|
||||
if (cookieData[0] !== "token") {
|
||||
document.cookie = `${encodeURIComponent(cookieData[0])}=${encodeURIComponent(cookieData[1])}; path=/`;
|
||||
}
|
||||
}
|
||||
localStorage.clear();
|
||||
let storage = JSON.parse(data.localStorage);
|
||||
let storeNames = Object.keys(storage);
|
||||
console.log(localStorage);
|
||||
for (let i = 0; i < storeNames.length; i++) {
|
||||
localStorage.setItem(storeNames[i], storage[storeNames[i]]);
|
||||
}
|
||||
}
|
||||
console.log("sending");
|
||||
body.username = username;
|
||||
await fetch("/api/profile/edit", {
|
||||
credentials: "include",
|
||||
headers: {
|
||||
"Content-type": "application/json; charset=UTF-8",
|
||||
},
|
||||
body: JSON.stringify(body),
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
});
|
||||
console.log("sent");
|
||||
document.getElementById("popup").style.display = "none";
|
||||
location.reload();
|
||||
}
|
||||
document.addEventListener("DOMContentLoaded", async () => {
|
||||
document.getElementById("pfp_upload").addEventListener("change", (e) => {
|
||||
if (e.target.files[0].size > 4000000) {
|
||||
console.log("too big!! no upload!!");
|
||||
e.target.value = "";
|
||||
}
|
||||
});
|
||||
document.getElementById("submit").addEventListener("click", await setProfile);
|
||||
document.getElementById("clear").addEventListener("click", async()=>{state="clearpfp";await setProfile()});
|
||||
document.querySelectorAll("#edit").forEach((element) => {
|
||||
element.addEventListener("click", (e) => {
|
||||
console.log(e.target.parentElement.children[0].id);
|
||||
if (e.target.parentElement.children[0].id == "name") {
|
||||
state = "name";
|
||||
document.getElementById("title").innerText = "Set your name.";
|
||||
document.getElementById("text").setAttribute("maxlength", "20");
|
||||
document.getElementById("pfp_upload").style.display = "none";
|
||||
document.getElementById("pfp_reminder").style.display = "none";
|
||||
document.getElementById("body-text").style.display = "none";
|
||||
document.getElementById("clear").style.display = "none";
|
||||
document.getElementById("text").style.display = "flex";
|
||||
document.getElementById("text").value = userData["name"];
|
||||
document.getElementById("counter").innerText = `${document.getElementById("text").value.length} / ${document.getElementById("text").attributes.maxlength.value}`;
|
||||
document.getElementById("counter").style.display = "flex";
|
||||
document.getElementById("submit").style.display = "flex";
|
||||
document.getElementById("popup").style.display = "flex";
|
||||
} else if (e.target.parentElement.children[0].id == "bio") {
|
||||
state = "bio";
|
||||
document.getElementById("title").innerText = "Set your about me.";
|
||||
document.getElementById("text").setAttribute("maxlength", "200");
|
||||
document.getElementById("pfp_upload").style.display = "none";
|
||||
document.getElementById("pfp_reminder").style.display = "none";
|
||||
document.getElementById("body-text").style.display = "none";
|
||||
document.getElementById("clear").style.display = "none";
|
||||
document.getElementById("text").style.display = "flex";
|
||||
document.getElementById("text").value = userData["about"];
|
||||
document.getElementById("counter").innerText = `${document.getElementById("text").value.length} / ${document.getElementById("text").attributes.maxlength.value}`;
|
||||
document.getElementById("counter").style.display = "flex";
|
||||
document.getElementById("submit").style.display = "flex";
|
||||
document.getElementById("popup").style.display = "flex";
|
||||
} else if (e.target.parentElement.children[0].id == "custom") {
|
||||
state = "custom";
|
||||
document.getElementById("title").innerText = "Set your custom CSS.";
|
||||
document.getElementById("text").setAttribute("maxlength", "2048");
|
||||
document.getElementById("pfp_upload").style.display = "none";
|
||||
document.getElementById("pfp_reminder").style.display = "none";
|
||||
document.getElementById("body-text").style.display = "none";
|
||||
document.getElementById("clear").style.display = "none";
|
||||
document.getElementById("text").style.display = "flex";
|
||||
document.getElementById("text").value = userData["css"];
|
||||
document.getElementById("counter").innerText = `${document.getElementById("text").value.length} / ${document.getElementById("text").attributes.maxlength.value}`;
|
||||
document.getElementById("counter").style.display = "flex";
|
||||
document.getElementById("submit").style.display = "flex";
|
||||
document.getElementById("popup").style.display = "flex";
|
||||
} else if (e.target.parentElement.children[0].id == "pfp") {
|
||||
state = "pfp";
|
||||
document.getElementById("title").innerText = "Set your new profile picture.";
|
||||
document.getElementById("pfp_upload").style.display = "flex";
|
||||
document.getElementById("pfp_reminder").style.display = "flex";
|
||||
document.getElementById("body-text").style.display = "none";
|
||||
document.getElementById("clear").style.display = "flex";
|
||||
document.getElementById("text").style.display = "none";
|
||||
document.getElementById("counter").style.display = "none";
|
||||
document.getElementById("submit").style.display = "flex";
|
||||
document.getElementById("popup").style.display = "flex";
|
||||
}
|
||||
});
|
||||
});
|
||||
document.getElementById("close").addEventListener("click", () => {
|
||||
document.getElementById("popup").style.display = "none";
|
||||
});
|
||||
document.getElementById("text").addEventListener("input", () => {
|
||||
document.getElementById("counter").innerText = `${document.getElementById("text").value.length} / ${document.getElementById("text").attributes.maxlength.value}`;
|
||||
});
|
||||
document.getElementById("upload").addEventListener("click", async () => {
|
||||
state = "upload";
|
||||
document.getElementById("title").innerText = "Warning";
|
||||
document.getElementById("pfp_upload").style.display = "none";
|
||||
document.getElementById("pfp_reminder").style.display = "none";
|
||||
document.getElementById("body-text").style.display = "flex";
|
||||
document.getElementById("body-text").innerText = "This will overwrite any data you may have saved in the cloud. Click Submit to continue, or X to stop.";
|
||||
document.getElementById("text").style.display = "none";
|
||||
document.getElementById("clear").style.display = "none";
|
||||
document.getElementById("counter").style.display = "none";
|
||||
document.getElementById("submit").style.display = "flex";
|
||||
document.getElementById("popup").style.display = "flex";
|
||||
});
|
||||
document.getElementById("download").addEventListener("click", async () => {
|
||||
state = "download";
|
||||
document.getElementById("title").innerText = "Warning";
|
||||
document.getElementById("pfp_upload").style.display = "none";
|
||||
document.getElementById("pfp_reminder").style.display = "none";
|
||||
document.getElementById("body-text").style.display = "flex";
|
||||
document.getElementById("body-text").innerText = "This will overwrite any data you may have saved locally. Click Submit to continue, or X to stop.";
|
||||
document.getElementById("text").style.display = "none";
|
||||
document.getElementById("clear").style.display = "none";
|
||||
document.getElementById("counter").style.display = "none";
|
||||
document.getElementById("submit").style.display = "flex";
|
||||
document.getElementById("popup").style.display = "flex";
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<alerts> </alerts>
|
||||
<body>
|
||||
<header>
|
||||
<a href="/index.html">Home</a>
|
||||
<a href="/bookmarklets.html">Bookmarklets</a>
|
||||
<a href="/projects.html">Games</a>
|
||||
<a href="/apps.html">Apps</a>
|
||||
<a href="/settings.html">Settings</a>
|
||||
<a id="blank" href="#">Open Blank</a>
|
||||
<a href="/u/" class="usericon"><img src="/img/user.svg" /></a>
|
||||
</header>
|
||||
<main>
|
||||
<!-- <a class="friend-icon" href="/friends"><img src="/img/friend.svg"></a> -->
|
||||
<input type="text" readonly value="{{ url_gen }}" />
|
||||
<div class="samerow">
|
||||
<button id="download">Download Backup</button>
|
||||
<button id="upload">Upload Backup</button>
|
||||
</div>
|
||||
<div>
|
||||
<div id="custom"></div>
|
||||
{{ css_edit }}
|
||||
</div>
|
||||
<div class="profile top">
|
||||
<img src="{{ user_pfp }}" class="pfp" id="pfp" />
|
||||
<img src="/img/edit.svg" id="edit" />
|
||||
<div class="profile top text">
|
||||
<div class="samerow edit" id="name">
|
||||
<h1 id="name">{{ name }}</h1>
|
||||
<img src="/img/edit.svg" id="edit" />
|
||||
</div>
|
||||
<div class="samerow">{{ badges }}</div>
|
||||
<h2>Joined {{ join_date }}</h2>
|
||||
<h2>Last online {{ online_time }}</h2>
|
||||
</div>
|
||||
<div class="profile top text right">
|
||||
<div class="samerow edit" id="about">
|
||||
<h1 id="bio">Bio</h1>
|
||||
<img src="/img/edit.svg" id="edit" />
|
||||
</div>
|
||||
<h2 id="about">{{ about }}</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="profile played">
|
||||
<h2>Top Games:</h2>
|
||||
<div id="played-games">
|
||||
{{ played_games }}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<popups>
|
||||
<div id="popup" style="display: none">
|
||||
<h1 id="title"></h1>
|
||||
<p id="body-text"></p>
|
||||
<input type="text" id="text" />
|
||||
<p id="counter">0 / 0</p>
|
||||
<input type="file" id="pfp_upload" name="filename" accept=".png,.jpg,.jpeg,.gif,.avif,.webp,.tiff,.svg" />
|
||||
<p id="pfp_reminder">4 MB file upload max</p>
|
||||
<button id="clear">Clear Profile Picture</button>
|
||||
<button id="submit">Submit</button>
|
||||
<button id="close">X</button>
|
||||
</div>
|
||||
</popups>
|
||||
<footer>
|
||||
<a href="https://gitlab.com/skysthelimit.dev/selenite">Source</a>
|
||||
<a href="https://discord.gg/7jyufnwJNf">Discord</a>
|
||||
<a href="/suggest.html">Suggestions & Bugs</a>
|
||||
<a href="/contact.html">Contact</a>
|
||||
<a href="/support.html">Donate</a>
|
||||
<a href="/about.html">About</a>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
118
html/register.html
Executable file
118
html/register.html
Executable file
@ -0,0 +1,118 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="sl-theme-dark" lang="en">
|
||||
<head>
|
||||
<!-- initialize theme vars
|
||||
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->
|
||||
|
||||
<!-- initialize externals -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
|
||||
<script src=" https://cdn.jsdelivr.net/npm/js-cookie@3.0.5/dist/js.cookie.min.js "></script>
|
||||
|
||||
<!-- initialize my stuff -->
|
||||
<script src="/js/all.min.js"></script>
|
||||
<script src="/js/main.js"></script>
|
||||
|
||||
<script src="https://js.hcaptcha.com/1/api.js" async defer></script>
|
||||
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
|
||||
<!-- seo + other things -->
|
||||
<title>Register | Selenite</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
document.getElementById("close").addEventListener("click", () => {
|
||||
document.getElementById("popup").style.display = "none";
|
||||
if (document.getElementById("title").innerText == "Registered successfully") {
|
||||
location.href = "/login";
|
||||
}
|
||||
});
|
||||
document.getElementById("register").addEventListener("click", async () => {
|
||||
let username = document.getElementById("username").value;
|
||||
let password = document.getElementById("password").value;
|
||||
let captcha = document.getElementById("hcaptcha").firstChild.dataset.hcaptchaResponse;
|
||||
if (!document.getElementById("hcaptcha").firstChild.dataset.hcaptchaResponse) {
|
||||
document.getElementById("title").innerText = "Failed to register";
|
||||
document.getElementById("reason").innerText = "You have not done the CAPTCHA. Please complete the CAPTCHA before continuing.";
|
||||
document.getElementById("popup").style.display = "flex";
|
||||
return;
|
||||
}
|
||||
if (username.length < 17 && username.length > 2 && !/[^a-zA-Z0-9._-]/.test(username)) {
|
||||
} else {
|
||||
document.getElementById("title").innerText = "Failed to register";
|
||||
document.getElementById("reason").innerText = "Your username is invalid. Please make your username within the limits described.";
|
||||
document.getElementById("popup").style.display = "flex";
|
||||
return;
|
||||
}
|
||||
if (!/^((?=\S*?[A-Z])(?=\S*?[a-z])(?=\S*?[0-9]).{5,})\S$/.test(password)) {
|
||||
document.getElementById("title").innerText = "Failed to register";
|
||||
document.getElementById("reason").innerText = "Your password is invalid. Please make your password within the limits described.";
|
||||
document.getElementById("popup").style.display = "flex";
|
||||
return;
|
||||
}
|
||||
|
||||
let data = await (
|
||||
await fetch("/register", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
username: username,
|
||||
password: password,
|
||||
"h-captcha-response": captcha,
|
||||
}),
|
||||
headers: {
|
||||
"Content-type": "application/json; charset=UTF-8",
|
||||
},
|
||||
})
|
||||
).json();
|
||||
console.log(data);
|
||||
if (data.success) {
|
||||
document.getElementById("title").innerText = "Registered successfully";
|
||||
document.getElementById("reason").innerText = `Please save the following, this is required to reset your password.\n\n${data.key}\n\nExit to continue`;
|
||||
} else {
|
||||
console.log("Error: ", data.reason);
|
||||
document.getElementById("title").innerText = "Failed to register";
|
||||
document.getElementById("reason").innerText = data.reason;
|
||||
}
|
||||
document.getElementById("popup").style.display = "flex";
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<alerts> </alerts>
|
||||
<body id="noscroll">
|
||||
<header>
|
||||
<a href="/index.html">Home</a>
|
||||
<a href="/bookmarklets.html">Bookmarklets</a>
|
||||
<a href="/projects.html">Games</a>
|
||||
<a href="/apps.html">Apps</a>
|
||||
<a href="/settings.html">Settings</a>
|
||||
<a id="blank" href="#">Open Blank</a>
|
||||
<a href="/u/" class="usericon"><img src="/img/user.svg" /></a>
|
||||
</header>
|
||||
<main id="main" class="noscroll">
|
||||
<h2>Register a new account</h2>
|
||||
<input type="text" id="username" placeholder="username" />
|
||||
<p>3-16 characters<br />capital, lowercase, numbers, dash, underscore, and dots allowed</p>
|
||||
<input type="password" id="password" placeholder="password" />
|
||||
<p>6+ characters<br />one uppercase, lowercase, and number at least</p>
|
||||
<div class="h-captcha" id="hcaptcha" data-sitekey="1774ec96-39be-4fb0-9e82-f4c62354b8fa"></div>
|
||||
<p><a href="/login">Or login</a></p>
|
||||
<button type="submit" value="Submit" id="register">Register</button>
|
||||
</main>
|
||||
<popups>
|
||||
<div id="popup" style="display: none">
|
||||
<h1 id="title"></h1>
|
||||
<p id="reason"></p>
|
||||
<button id="close">X</button>
|
||||
</div>
|
||||
</popups>
|
||||
<footer class="noscroll">
|
||||
<a href="https://gitlab.com/skysthelimit.dev/selenite">Source</a>
|
||||
<a href="https://discord.gg/7jyufnwJNf">Discord</a>
|
||||
<a href="/suggest.html">Suggestions & Bugs</a>
|
||||
<a href="/contact.html">Contact</a>
|
||||
<a href="/support.html">Donate</a>
|
||||
<a href="/about.html">About</a>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
101
html/reset.html
Executable file
101
html/reset.html
Executable file
@ -0,0 +1,101 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="sl-theme-dark" lang="en">
|
||||
<head>
|
||||
<!-- initialize theme vars
|
||||
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->
|
||||
|
||||
<!-- initialize externals -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
|
||||
<script src=" https://cdn.jsdelivr.net/npm/js-cookie@3.0.5/dist/js.cookie.min.js "></script>
|
||||
|
||||
<!-- initialize my stuff -->
|
||||
<script src="/js/all.min.js"></script>
|
||||
<script src="/js/main.js"></script>
|
||||
|
||||
<script src="https://js.hcaptcha.com/1/api.js" async defer></script>
|
||||
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
|
||||
<!-- seo + other things -->
|
||||
<title>Reset Password | Selenite</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
document.getElementById("reset").addEventListener("submit", async (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
let username = document.getElementById("username").value;
|
||||
let password = document.getElementById("password").value;
|
||||
let key = document.getElementById("key").value;
|
||||
let captcha = document.getElementById("hcaptcha").firstChild.dataset.hcaptchaResponse;
|
||||
|
||||
let data = await (await fetch("/api/account/reset", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
username: username,
|
||||
password: password,
|
||||
key: key,
|
||||
'h-captcha-response': captcha,
|
||||
}),
|
||||
headers: {
|
||||
"Content-type": "application/json; charset=UTF-8",
|
||||
},
|
||||
})).json();
|
||||
console.log(data);
|
||||
if (data.success) {
|
||||
document.getElementById("title").innerText = "Reset successfully";
|
||||
document.getElementById("reason").innerText = `Your password has been reset successfully, click X to continue.`;
|
||||
} else {
|
||||
console.log("Error: ", data.reason);
|
||||
document.getElementById("title").innerText = "Failed to reset";
|
||||
document.getElementById("reason").innerText = data.reason;
|
||||
}
|
||||
document.getElementById("popup").style.display = "flex";
|
||||
document.getElementById("close").addEventListener("click", () => {
|
||||
document.getElementById("popup").style.display = "none";
|
||||
if(document.getElementById("title").innerText == "Registered successfully") {
|
||||
location.href = "/login"
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<alerts> </alerts>
|
||||
<body id="noscroll">
|
||||
<header>
|
||||
<a href="/index.html">Home</a>
|
||||
<a href="/bookmarklets.html">Bookmarklets</a>
|
||||
<a href="/projects.html">Games</a>
|
||||
<a href="/apps.html">Apps</a>
|
||||
<a href="/settings.html">Settings</a>
|
||||
<a id="blank" href="#">Open Blank</a>
|
||||
<a href="/u/" class="usericon"><img src="/img/user.svg"></a>
|
||||
</header>
|
||||
<main id="main" class="noscroll">
|
||||
<h2>Reset Password</h2>
|
||||
<form action="" id="reset">
|
||||
<input type="text" id="username" placeholder="username" />
|
||||
<input type="password" id="key" placeholder="key" />
|
||||
<input type="password" id="password" placeholder="password" />
|
||||
<div class="h-captcha" id="hcaptcha" data-sitekey="1774ec96-39be-4fb0-9e82-f4c62354b8fa"></div>
|
||||
<button type="submit" value="Submit">Reset Password</button>
|
||||
</form>
|
||||
</main>
|
||||
<popups>
|
||||
<div id="popup" style="display: none">
|
||||
<h1 id="title"></h1>
|
||||
<p id="reason"></p>
|
||||
<button id="close">X</button>
|
||||
</div>
|
||||
</popups>
|
||||
<footer class="noscroll">
|
||||
<a href="https://gitlab.com/skysthelimit.dev/selenite">Source</a>
|
||||
<a href="https://discord.gg/7jyufnwJNf">Discord</a>
|
||||
<a href="/suggest.html">Suggestions & Bugs</a>
|
||||
<a href="/contact.html">Contact</a>
|
||||
<a href="/support.html">Donate</a>
|
||||
<a href="/about.html">About</a>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
0
html/stats.html
Executable file
0
html/stats.html
Executable file
58
html/users.html
Normal file
58
html/users.html
Normal file
@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="sl-theme-dark" lang="en">
|
||||
<head>
|
||||
<!-- initialize theme vars
|
||||
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->
|
||||
|
||||
<!-- initialize externals -->
|
||||
<meta property="og:title" content="Selenite" />
|
||||
<meta property="description" content="Selenite is the best unblocked games site. With over 400 games and an account system, no other websites come close to Selenite." />
|
||||
<meta name="keywords" content="proxy, web proxy, unblock websites, unblock chromebook, free web proxy, proxy list, proxy sites, un block chromebook, online proxy, proxy server, proxysite, proxy youtube, bypass securly, bypass iboss, bypass lightspeed filter, chromebooks, unblock youtube, youtube proxy, unblocked youtube, youtube unblocked, unblock games, selenite, unblocked games, free games">
|
||||
<meta content="/favicon.png" property="og:image" />
|
||||
<meta content="#c77dff" data-react-helmet="true" name="theme-color" />
|
||||
<meta name="googlebot" content="index, follow, snippet" />
|
||||
<link rel="canonical" href="https://selenite.cc/" />
|
||||
<meta property="og:description" content="Selenite is the best unblocked games site. With over 400 games and an account system, no other websites come close to Selenite." />
|
||||
<meta property="og:title" content="Selenite">
|
||||
<meta property="og:type" content="website">
|
||||
|
||||
<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>
|
||||
<!-- <script src="/js/widget.js"></script> -->
|
||||
<script>
|
||||
</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>
|
||||
</head>
|
||||
<alerts> </alerts>
|
||||
<body>
|
||||
<h1 class="title">users</h1>
|
||||
<div id="users">
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
105
html/users.html.old
Executable file
105
html/users.html.old
Executable file
@ -0,0 +1,105 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="sl-theme-dark" lang="en">
|
||||
<head>
|
||||
<!-- initialize theme vars
|
||||
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->
|
||||
|
||||
<!-- initialize externals -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
|
||||
<script src=" https://cdn.jsdelivr.net/npm/js-cookie@3.0.5/dist/js.cookie.min.js "></script>
|
||||
|
||||
<!-- initialize my stuff -->
|
||||
<script src="/js/all.min.js"></script>
|
||||
<script src="/js/main.js"></script>
|
||||
<script src="/js/widget.js"></script>
|
||||
<script src="/js/themes.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
|
||||
<!-- seo + other things -->
|
||||
<title>Users | Selenite</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<script>
|
||||
async function loadUsers(query, page) {
|
||||
let above = false;
|
||||
let below = false;
|
||||
let data = await (await fetch(`/api/getUsers?page=${page - 1}&query=${query}`)).json();
|
||||
let users = data['users'];
|
||||
let url = new URL(location.href);
|
||||
|
||||
pages = Math.floor(data.count / 12);
|
||||
document.getElementById("users").innerHTML = "";
|
||||
for (let i = 0; i < Object.keys(users).length; i++) {
|
||||
document.getElementById("users").innerHTML += `<a href="/u/${users[i].username}" class="users"><img class="pfp" src="${users[i].pfp_url}"/><div class="user_info"><h1>${users[i].name}</h1><p>${users[i].about}</p></div></a>`;
|
||||
}
|
||||
document.getElementById("pages").innerHTML = "";
|
||||
for (let i = 1; i < pages + 1; i++) {
|
||||
if (i + 6 > page && i - 6 < page) {
|
||||
let curPage = parseInt(page);
|
||||
let element = document.createElement("a");
|
||||
if (!(i == curPage)) {
|
||||
url.searchParams.set("page", i);
|
||||
element.setAttribute("href", url);
|
||||
}
|
||||
element.setAttribute("class", `pages-btn`);
|
||||
element.innerText = i;
|
||||
document.getElementById("pages").append(element);
|
||||
} else {
|
||||
if (i + 6 > page) {
|
||||
above = true;
|
||||
}
|
||||
if (i - 6 < page) {
|
||||
below = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (above) {
|
||||
let element = document.createElement("a");
|
||||
element.setAttribute("class", "pages-btn");
|
||||
element.innerText = "...";
|
||||
document.getElementById("pages").append(element);
|
||||
}
|
||||
if (below) {
|
||||
let element = document.createElement("a");
|
||||
element.setAttribute("class", "pages-btn");
|
||||
element.innerText = "...";
|
||||
document.getElementById("pages").prepend(element);
|
||||
}
|
||||
}
|
||||
let pages;
|
||||
document.addEventListener("DOMContentLoaded", async () => {
|
||||
let params = location.search.substring(1).split("&");
|
||||
let query;
|
||||
let page;
|
||||
if (params) {
|
||||
for (let i = 0; i < params.length; i++) {
|
||||
if (params[i].startsWith("query")) {
|
||||
query = params[i].substring(6);
|
||||
}
|
||||
if (params[i].startsWith("page")) {
|
||||
page = params[i].substring(5);
|
||||
if (isNaN(page)) {
|
||||
page = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
await loadUsers(query ? query : "", page ? page : 0);
|
||||
document.getElementById("search").addEventListener("keydown", async (e) => {
|
||||
if (e.key == "Enter") {
|
||||
let url = new URL(location.href);
|
||||
url.searchParams.set("query", document.getElementById("search").value);
|
||||
url.searchParams.set("page", 1);
|
||||
location.href = url;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<alerts> </alerts>
|
||||
<body id="noscroll">
|
||||
<input id="search" type="text" placeholder="search.." />
|
||||
<div id="users"></div>
|
||||
<div id="pages"></div>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user