Allow editing of settings

This commit is contained in:
2017-06-24 02:10:04 +02:00
parent 3fcb1bc36e
commit 8d976488ee
4 changed files with 15 additions and 3 deletions

View File

@ -30,6 +30,7 @@ export class AnimeNotifier {
})
.then(response => response.text())
.then(html => Diff.innerHTML(this.app.content, html))
.then(() => this.app.emit("DOMContentLoaded"))
}
loading(isLoading: boolean) {
@ -42,13 +43,17 @@ export class AnimeNotifier {
updateActions() {
for(let element of findAll("action")) {
if(element["action assigned"]) {
continue
}
let actionName = element.dataset.action
element.addEventListener(element.dataset.trigger, e => {
actions[actionName](this, element, e)
})
element.classList.remove("action")
element["action assigned"] = true
}
}