fixing bugs in autoload db and theme that cause menu loading issues
This commit is contained in:
1 parent
bdf5a2cf7e
commit
ea2dedc153
2 files changed
+15
-15
No files matched your search
+3
-6
@@ -81,8 +81,8 @@ function importFileAction(file, hasLocalFile) {
|
|||||||
|
|
||||||
// detect cipher.js, load user ciphers
|
// detect cipher.js, load user ciphers
|
||||||
if (uCiph[0] == "// ciphers.js") {
|
if (uCiph[0] == "// ciphers.js") {
|
||||||
// optShowExtraCiphers = false // clear "Show Extra Ciphers" option
|
optShowExtraCiphers = false // clear "Show Extra Ciphers" option
|
||||||
// document.getElementById('chkbox_SEC').checked = false
|
document.getElementById('chkbox_SEC').checked = false
|
||||||
|
|
||||||
if (precalcDBLoaded) { // return if precalculated database is loaded
|
if (precalcDBLoaded) { // return if precalculated database is loaded
|
||||||
displayCalcNotification("Cipher import is disabled for CSV Databases!", 3000)
|
displayCalcNotification("Cipher import is disabled for CSV Databases!", 3000)
|
||||||
@@ -103,11 +103,8 @@ function importFileAction(file, hasLocalFile) {
|
|||||||
cipherList.push(eval("new cipher("+ciph[n].slice(1,-1)+")")) // remove parethesis, evaluate string as javascript code
|
cipherList.push(eval("new cipher("+ciph[n].slice(1,-1)+")")) // remove parethesis, evaluate string as javascript code
|
||||||
}
|
}
|
||||||
document.getElementById("calcOptionsPanel").innerHTML = "" // clear menu panel
|
document.getElementById("calcOptionsPanel").innerHTML = "" // clear menu panel
|
||||||
if(hasLocalFile){
|
|
||||||
// initCalc() // reinit. This seems to add duplicate menu options when loading a theme and so this call has been disabled.
|
|
||||||
} else {
|
|
||||||
initCalc() // reinit.
|
initCalc() // reinit.
|
||||||
}
|
|
||||||
|
|
||||||
updateTables() // update tables
|
updateTables() // update tables
|
||||||
updateInterfaceColor(true) // update interface color (first run)
|
updateInterfaceColor(true) // update interface color (first run)
|
||||||
|
|||||||
+12
-9
@@ -29,7 +29,9 @@ $(window).load(function(){
|
|||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body onload="initCalc(true)">
|
<body>
|
||||||
|
<!-- initCalc() needs to run before the db loads to create menu properly-->
|
||||||
|
<!-- <body onload="initCalc(true)"> -->
|
||||||
|
|
||||||
<div id="loader"></div>
|
<div id="loader"></div>
|
||||||
<canvas id="canv"></canvas>
|
<canvas id="canv"></canvas>
|
||||||
@@ -95,6 +97,15 @@ $(window).load(function(){
|
|||||||
<script src="calc/coderain.js"></script>
|
<script src="calc/coderain.js"></script>
|
||||||
<script src="lib/html2canvas.min.js"></script>
|
<script src="lib/html2canvas.min.js"></script>
|
||||||
|
|
||||||
|
<!-- AUTO LOAD DATABASE (DB) -->
|
||||||
|
<!-- To change the word matching database, reference a differnt file in the script below or append lined to db.txt -->
|
||||||
|
|
||||||
|
<script>
|
||||||
|
initCalc(true);
|
||||||
|
var database = loadFile('db.txt');
|
||||||
|
importFileAction(database, true);
|
||||||
|
</script>
|
||||||
|
|
||||||
<!-- AUTO LOAD THEME -->
|
<!-- AUTO LOAD THEME -->
|
||||||
<!-- To change the theme, uncomment the script below -->
|
<!-- To change the theme, uncomment the script below -->
|
||||||
|
|
||||||
@@ -103,12 +114,4 @@ $(window).load(function(){
|
|||||||
importFileAction(theme, true);
|
importFileAction(theme, true);
|
||||||
</script> -->
|
</script> -->
|
||||||
|
|
||||||
<!-- AUTO LOAD DATABASE (DB) -->
|
|
||||||
<!-- To change the word matching database, reference a differnt file in the script below or append lined to db.txt -->
|
|
||||||
|
|
||||||
<script>
|
|
||||||
var database = loadFile('db.txt');
|
|
||||||
importFileAction(database, true);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
Reference in new issue
Block a user