mirror of https://github.com/espruino/BangleApps
Test
parent
2ea52e9f52
commit
d9b4d27a82
|
@ -20,16 +20,13 @@
|
|||
<script>
|
||||
function onInit(){
|
||||
try{
|
||||
Util.showModal("Downloading trigger from BangleJs...");
|
||||
Util.readStorageFile("ha.trigger.json", data=>{
|
||||
document.getElementById("triggers").innerHTML = data;
|
||||
Util.hideModal();
|
||||
Util.readStorage("ha.trigger.json", data=>{
|
||||
document.getElementById("triggers").innerHTML += data;
|
||||
});
|
||||
console.log("Loaded from BangleJs:\n" + data);
|
||||
} catch(ex){
|
||||
console.log("(Warning) Failed loading ha.trigger.json from BangleJs. Using default.");
|
||||
console.log(ex);
|
||||
Util.hideModal();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue