mirror of
https://github.com/khairul169/honey.git
synced 2025-04-28 14:59:32 +07:00
Settings: Fire all events on page load
This commit is contained in:
parent
8c7e3e17dc
commit
b351c2b8d4
@ -27,7 +27,8 @@ export function addOnOffTile(conf, icon, name, desc, key, func) {
|
|||||||
if (func) item.addEventListener("click", f)
|
if (func) item.addEventListener("click", f)
|
||||||
|
|
||||||
handleState()
|
handleState()
|
||||||
if (func && conf.changed(key)) f()
|
if (func) f()
|
||||||
|
|
||||||
document.getElementById("settings").appendChild(item)
|
document.getElementById("settings").appendChild(item)
|
||||||
return item
|
return item
|
||||||
}
|
}
|
@ -37,10 +37,6 @@ export default class Config {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
changed(key) {
|
|
||||||
return this.get(key) != this.config["ui"][key]
|
|
||||||
}
|
|
||||||
|
|
||||||
getServices() {
|
getServices() {
|
||||||
return this.config["services"]
|
return this.config["services"]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user