mirror of
https://github.com/khairul169/honey.git
synced 2026-10-05 02:13:55 +07:00
Refactor Privacy to Overview, code cleanup
This commit is contained in:
@@ -39,13 +39,13 @@ export default class Settings {
|
||||
"animations", EVENTS.onAnimationChange
|
||||
)
|
||||
|
||||
document.getElementById("theme-switcher").addEventListener("click", () => {
|
||||
document.querySelector("#theme-switcher").addEventListener("click", () => {
|
||||
darkMode.click()
|
||||
})
|
||||
}
|
||||
|
||||
checkLocalStorage() {
|
||||
let warn = document.getElementById("no-cookies").classList
|
||||
let warn = document.querySelector("#no-cookies").classList
|
||||
if (this.config.storageAvailable) warn.add("hidden")
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ export function onThemeChange(config) {
|
||||
|
||||
export function onNewTabChange(config) {
|
||||
let openNewTab = config.get("open_new_tab")
|
||||
let appList = document.getElementById("app-list").children
|
||||
let appList = document.querySelector("#app-list").children
|
||||
|
||||
for (let app of appList) {
|
||||
if (openNewTab) app.setAttribute("target", "_blank")
|
||||
|
||||
@@ -29,6 +29,6 @@ export function addOnOffTile(conf, icon, name, desc, key, func) {
|
||||
handleState()
|
||||
if (func) f()
|
||||
|
||||
document.getElementById("settings").appendChild(item)
|
||||
document.querySelector("#settings").appendChild(item)
|
||||
return item
|
||||
}
|
||||
Reference in New Issue
Block a user