changed script launch
changed how settings are handled
This commit is contained in:
parent
7f67791012
commit
88037c5ed8
52
index.html
52
index.html
@ -1,31 +1,41 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<title>Template Generator</title>
|
<header>
|
||||||
<link rel="icon" type="image/x-icon" href="favicon.ico" />
|
<title>Template Generator</title>
|
||||||
<meta charset="UTF-8" />
|
<link rel="icon" type="image/x-icon" href="favicon.ico" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<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>
|
||||||
<link
|
//current javascript version
|
||||||
rel="stylesheet"
|
let jsVer = "9.9.8";
|
||||||
href="https://fonts.googleapis.com/css?family=Montserrat"
|
|
||||||
/>
|
|
||||||
<link rel="stylesheet" href="css/w3.css" />
|
|
||||||
<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>
|
//settings
|
||||||
|
window.settings = {
|
||||||
|
lineBreak: 100,
|
||||||
|
localOnly: true,
|
||||||
|
};
|
||||||
|
|
||||||
let jsVer = "9.9.7";
|
let script = document.createElement("script");
|
||||||
|
script.src = "js/" + jsVer + "/init.js";
|
||||||
|
script.type = "module";
|
||||||
|
document.head.appendChild(script);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<link
|
||||||
let script = document.createElement("script");
|
rel="stylesheet"
|
||||||
script.src = "js/" + jsVer + "/main.js";
|
href="https://fonts.googleapis.com/css?family=Lato"
|
||||||
script.type = "module";
|
/>
|
||||||
document.head.appendChild(script);
|
<link
|
||||||
</script>
|
rel="stylesheet"
|
||||||
|
href="https://fonts.googleapis.com/css?family=Montserrat"
|
||||||
|
/>
|
||||||
|
<link rel="stylesheet" href="css/w3.css" />
|
||||||
|
<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" />
|
||||||
|
</header>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@ -16,8 +16,6 @@ window.activeState = {
|
|||||||
fileName: "",
|
fileName: "",
|
||||||
lastElement: "",
|
lastElement: "",
|
||||||
serverFilesTs: "",
|
serverFilesTs: "",
|
||||||
lineBreak: 100,
|
|
||||||
localOnly: true,
|
|
||||||
templates: [],
|
templates: [],
|
||||||
templateFieldTypes: [
|
templateFieldTypes: [
|
||||||
"simpleInput",
|
"simpleInput",
|
||||||
@ -39,6 +37,11 @@ window.activeState = {
|
|||||||
|
|
||||||
function init() {
|
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
|
//check if user is logged in
|
||||||
sessionVerification();
|
sessionVerification();
|
||||||
let verfiedStatus = window.sessionStorage.getItem(sha256("verified"));
|
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