2024-07-04 00:16:49 -06:00
|
|
|
function onload() {
|
|
|
|
redirect()
|
|
|
|
sdocument.getElementById("body").style.fontFamily = "system-ui, sans-serif";
|
|
|
|
}
|
|
|
|
|
2024-07-01 14:41:14 -06:00
|
|
|
function toggleTheme() {
|
|
|
|
// Obtains an array of all <link>
|
|
|
|
// elements.
|
|
|
|
// Select your element using indexing.
|
2024-07-03 18:50:21 -06:00
|
|
|
if (document.getElementById("body").style.fontFamily !== "standardGalactic") {
|
|
|
|
document.getElementById("body").style.fontFamily = "standardGalactic";
|
|
|
|
}
|
2024-07-04 00:16:49 -06:00
|
|
|
else{
|
2024-07-03 18:50:21 -06:00
|
|
|
document.getElementById("body").style.fontFamily = "system-ui, sans-serif";
|
|
|
|
}
|
2024-07-04 00:16:49 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
function redirect() {
|
|
|
|
let chromium = /Chrome|Chromium|OPR|Opera|Edge|UC|QQ|Brave/.test(
|
|
|
|
navigator.userAgent
|
|
|
|
);
|
|
|
|
let disclaimer = `<div class="web-disclaimer">`;
|
|
|
|
if (chromium)
|
|
|
|
window.location.replace("/nochrome");
|
2024-07-08 16:59:15 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
// Resizable textarea
|
|
|
|
const tx = document.getElementsByTagName("textarea");
|
|
|
|
for (let i = 0; i < tx.length; i++) {
|
|
|
|
tx[i].setAttribute("style", "height:" + (tx[i].scrollHeight) + "px;overflow-y:hidden;");
|
|
|
|
tx[i].addEventListener("input", OnInput, false);
|
|
|
|
}
|
|
|
|
|
|
|
|
function OnInput() {
|
|
|
|
this.style.height = 'auto';
|
|
|
|
this.style.height = (this.scrollHeight) + "px";
|
2024-07-04 00:16:49 -06:00
|
|
|
}
|