1
0
Fork 0

Fix scoping, add 'file' variable

master
stweedo 2023-06-29 12:25:38 -05:00
parent 6d58a466b2
commit 297d8b15ac
2 changed files with 6 additions and 6 deletions

View File

@ -1 +0,0 @@
gassist.json

View File

@ -1,14 +1,15 @@
let storage = require('Storage');
(function (back) {
let storage = require('Storage');
let file = "gassist.json";
// Load and set default settings
let appSettings = Object.assign({
enableTap : true
}, storage.readJSON("gassist.json", true) || {});
}, storage.readJSON(file, true) || {});
// Save settings to storage
function writeSettings() {
storage.writeJSON("gassist.json", appSettings);
storage.writeJSON(file, appSettings);
}
function showMenu() {
@ -29,4 +30,4 @@ let storage = require('Storage');
}
// Initially show the menu
showMenu();
});
});