Helper file and token prep

This commit is contained in:
2023-10-02 00:23:59 -04:00
parent 937278c8d5
commit 101bfd0d30
4 changed files with 50 additions and 14 deletions

View File

@@ -1,7 +1,6 @@
var DEBUG = false;
var isMobile = false;
var USE_ORIGIN = "";
// TODO: Add check for DOMAIN_OVERRIDE
const dbp = (msg) => {
if(DEBUG){
@@ -21,7 +20,12 @@ const SwalConfig = {
buttonsStyling: false,
}
const invalidChars = ['/', '\\', '>', '<', ':', '*', '|', '"', '\'', '?', '\0'];
const invalidChars = [
'/', '\\', '>',
'<', ':', '*',
'|', '"', '\'',
'?', '\0'
];
const replaceInvalid = (str) => {
var cache = str;
@@ -278,7 +282,9 @@ $(() => {
dbp("Is Mobile 👍🏻");
disableNonDesktopElements();
}
// Auto Retry
// TODO: Replace with redirect to home with logout set if error
var isRetry = false;
if(window.location.pathname.includes("auth")){
var ErrorMsg = document.getElementById("ErrorResult");
@@ -289,6 +295,7 @@ $(() => {
beginOauth();
}
}
// Console Welcome
if(!isRetry){
console.log("%cWelcome Hacker!", "color: #ff0000; font-size: 7em; font-style: italic; font-family: 'Times New Roman', Times, serif;");