mirror of
https://github.com/khairul169/honey.git
synced 2026-10-04 18:03:54 +07:00
Minor improvements
This commit is contained in:
@@ -62,6 +62,7 @@ function config(key, value) {
|
||||
let val = localStorage.getItem(key);
|
||||
if (CONFIG["ui"][key] == value && !val) return;
|
||||
if (write) localStorage.setItem(key, value);
|
||||
else if (!val) return CONFIG["ui"][key].toString();
|
||||
return val;
|
||||
}
|
||||
if (write) CONFIG["ui"][key] = value.toString();
|
||||
@@ -77,8 +78,10 @@ function load_config(conf) {
|
||||
if (conf) CONFIG = JSON.parse(conf);
|
||||
let ui = CONFIG.ui;
|
||||
set("app-name", ui.name);
|
||||
document.title = ui.name;
|
||||
set("app-desc", ui.desc);
|
||||
get("app-icon").src = ui.icon;
|
||||
get("favicon").href = ui.icon;
|
||||
if (!check_cookies()) get("nocook").classList.remove("none");
|
||||
if (ui.hosted_by) set("app-hostedby", ui.hosted_by);
|
||||
else get("app-hostedby").parentNode.style.display = "none";
|
||||
|
||||
+5
-2
@@ -1,3 +1,4 @@
|
||||
document.title = "Loading...";
|
||||
function onload() {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", "config/config.json");
|
||||
@@ -54,9 +55,11 @@ function load_apps() {
|
||||
let secures = 0;
|
||||
let i = 0;
|
||||
while (i < CONFIG["services"].length) {
|
||||
let app = mk_entry(CONFIG["services"][i]);
|
||||
let item = CONFIG["services"][i];
|
||||
let app = mk_entry(item);
|
||||
final += app;
|
||||
i++;
|
||||
if (is_secure(item["href"])) secures++;
|
||||
}
|
||||
get("applist").innerHTML = final;
|
||||
set("services-total", i);
|
||||
@@ -110,4 +113,4 @@ function open_screen(button) {
|
||||
screens.style.height = null;
|
||||
S_TAP_LOCK = false;
|
||||
}, 420);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user