- renamed default expression folder

- split localStorage functions into separate js
This commit is contained in:
RossAsscends
2023-03-16 04:18:35 +09:00
parent 15f1d14db2
commit f558e12bda
32 changed files with 32 additions and 29 deletions

View File

@ -0,0 +1,25 @@
////////////////// LOCAL STORAGE HANDLING /////////////////////
export function SaveLocal(target, val) {
localStorage.setItem(target, val);
console.log('SaveLocal -- '+target+' : '+val);
}
export function LoadLocal(target) {
return localStorage.getItem(target);
}
export function LoadLocalBool(target){
let result = localStorage.getItem(target) === 'true';
return result;
}
export function CheckLocal() {
console.log("----------local storage---------");
var i;
for (i = 0; i < localStorage.length; i++) {
console.log(localStorage.key(i) +" : " +localStorage.getItem(localStorage.key(i)));
}
console.log("------------------------------");
}
export function ClearLocal() {localStorage.clear();console.log('Removed All Local Storage');}
/////////////////////////////////////////////////////////////////////////