fixing auto loading theme bugs and moving db and theme config to index.html

This commit is contained in:
malonehunter committed 2023-10-10 10:01:37 -04:00
1 parent c632242ac2
commit b2a9bb0194
7 files changed
+40 -947

No files matched your search

+14 -18
View File
@@ -264,6 +264,17 @@ $(document).ready(function(){
// ==================================================================
// export.js
function loadFile(filePath) {
var result = null;
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET", filePath, false);
xmlhttp.send();
if (xmlhttp.status==200) {
result = xmlhttp.responseText;
}
return result;
}
$(document).ready(function(){
$("body").on("click", "#btn-print-cipher-png", function () { // for future elements
@@ -330,24 +341,9 @@ $(document).ready(function(){
openImageWindow(".numPropTooltip", fileName, optImageScale);
});
function loadFile(filePath) {
var result = null;
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET", filePath, false);
xmlhttp.send();
if (xmlhttp.status==200) {
result = xmlhttp.responseText;
}
return result;
}
//Autoload DB
var file = loadFile('db.txt');
importFileAction(file, true);
//Autoload Theme
var file = loadFile('theme/default-interface.js');
importFileAction(file, true);
// //Autoload DB function has moved to index.html for easy editing
// var file = loadFile('db.txt');
// importFileAction(file, true);
$("body").on("change", "#importFileDummy", function(){
var file = document.querySelector("#importFileDummy").files[0];