changed script launch
changed how settings are handled
This commit is contained in:
parent
7f67791012
commit
88037c5ed8
34
index.html
34
index.html
@ -1,12 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<header>
|
||||
<title>Template Generator</title>
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico" />
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato" />
|
||||
<script>
|
||||
//current javascript version
|
||||
let jsVer = "9.9.8";
|
||||
|
||||
//settings
|
||||
window.settings = {
|
||||
lineBreak: 100,
|
||||
localOnly: true,
|
||||
};
|
||||
|
||||
let script = document.createElement("script");
|
||||
script.src = "js/" + jsVer + "/init.js";
|
||||
script.type = "module";
|
||||
document.head.appendChild(script);
|
||||
</script>
|
||||
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css?family=Lato"
|
||||
/>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css?family=Montserrat"
|
||||
@ -15,17 +35,7 @@
|
||||
<link rel="stylesheet" href="css/w3-colors-flat.css" />
|
||||
<link rel="stylesheet" href="css/font-awesome/css/all.min.css" />
|
||||
<link rel="stylesheet" href="css/styles.css" />
|
||||
|
||||
<script>
|
||||
|
||||
let jsVer = "9.9.7";
|
||||
|
||||
|
||||
let script = document.createElement("script");
|
||||
script.src = "js/" + jsVer + "/main.js";
|
||||
script.type = "module";
|
||||
document.head.appendChild(script);
|
||||
</script>
|
||||
</header>
|
||||
|
||||
<body>
|
||||
<div
|
||||
|
||||
@ -16,8 +16,6 @@ window.activeState = {
|
||||
fileName: "",
|
||||
lastElement: "",
|
||||
serverFilesTs: "",
|
||||
lineBreak: 100,
|
||||
localOnly: true,
|
||||
templates: [],
|
||||
templateFieldTypes: [
|
||||
"simpleInput",
|
||||
@ -39,6 +37,11 @@ window.activeState = {
|
||||
|
||||
function init() {
|
||||
|
||||
//load settings into activeState
|
||||
for (let setting of Object.entries(window.settings)) {
|
||||
activeState[setting[0]] = setting[1];
|
||||
}
|
||||
|
||||
//check if user is logged in
|
||||
sessionVerification();
|
||||
let verfiedStatus = window.sessionStorage.getItem(sha256("verified"));
|
||||
@ -157,4 +160,4 @@ function printVersion() {
|
||||
}
|
||||
}
|
||||
|
||||
export default init;
|
||||
init();
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
import init from "./init.js";
|
||||
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => init());
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user