mirror of
https://github.com/khairul169/honey.git
synced 2025-04-28 14:59:32 +07:00
Minor improvements
This commit is contained in:
parent
928b9a9b7f
commit
63fa38d5d9
@ -3,8 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||||
<title>honey</title>
|
<link rel="icon" id="favicon">
|
||||||
<link rel="icon" href="img/icon.png">
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/main.css">
|
<link rel="stylesheet" type="text/css" href="css/main.css">
|
||||||
<link rel="stylesheet" type="text/css" href="css/dark.css" id="css_dark" disabled>
|
<link rel="stylesheet" type="text/css" href="css/dark.css" id="css_dark" disabled>
|
||||||
<script type="text/javascript" src="js/dom.js"></script>
|
<script type="text/javascript" src="js/dom.js"></script>
|
||||||
@ -163,4 +162,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -62,6 +62,7 @@ function config(key, value) {
|
|||||||
let val = localStorage.getItem(key);
|
let val = localStorage.getItem(key);
|
||||||
if (CONFIG["ui"][key] == value && !val) return;
|
if (CONFIG["ui"][key] == value && !val) return;
|
||||||
if (write) localStorage.setItem(key, value);
|
if (write) localStorage.setItem(key, value);
|
||||||
|
else if (!val) return CONFIG["ui"][key].toString();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
if (write) CONFIG["ui"][key] = value.toString();
|
if (write) CONFIG["ui"][key] = value.toString();
|
||||||
@ -77,8 +78,10 @@ function load_config(conf) {
|
|||||||
if (conf) CONFIG = JSON.parse(conf);
|
if (conf) CONFIG = JSON.parse(conf);
|
||||||
let ui = CONFIG.ui;
|
let ui = CONFIG.ui;
|
||||||
set("app-name", ui.name);
|
set("app-name", ui.name);
|
||||||
|
document.title = ui.name;
|
||||||
set("app-desc", ui.desc);
|
set("app-desc", ui.desc);
|
||||||
get("app-icon").src = ui.icon;
|
get("app-icon").src = ui.icon;
|
||||||
|
get("favicon").href = ui.icon;
|
||||||
if (!check_cookies()) get("nocook").classList.remove("none");
|
if (!check_cookies()) get("nocook").classList.remove("none");
|
||||||
if (ui.hosted_by) set("app-hostedby", ui.hosted_by);
|
if (ui.hosted_by) set("app-hostedby", ui.hosted_by);
|
||||||
else get("app-hostedby").parentNode.style.display = "none";
|
else get("app-hostedby").parentNode.style.display = "none";
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
document.title = "Loading...";
|
||||||
function onload() {
|
function onload() {
|
||||||
let xhr = new XMLHttpRequest();
|
let xhr = new XMLHttpRequest();
|
||||||
xhr.open("GET", "config/config.json");
|
xhr.open("GET", "config/config.json");
|
||||||
@ -54,9 +55,11 @@ function load_apps() {
|
|||||||
let secures = 0;
|
let secures = 0;
|
||||||
let i = 0;
|
let i = 0;
|
||||||
while (i < CONFIG["services"].length) {
|
while (i < CONFIG["services"].length) {
|
||||||
let app = mk_entry(CONFIG["services"][i]);
|
let item = CONFIG["services"][i];
|
||||||
|
let app = mk_entry(item);
|
||||||
final += app;
|
final += app;
|
||||||
i++;
|
i++;
|
||||||
|
if (is_secure(item["href"])) secures++;
|
||||||
}
|
}
|
||||||
get("applist").innerHTML = final;
|
get("applist").innerHTML = final;
|
||||||
set("services-total", i);
|
set("services-total", i);
|
||||||
@ -110,4 +113,4 @@ function open_screen(button) {
|
|||||||
screens.style.height = null;
|
screens.style.height = null;
|
||||||
S_TAP_LOCK = false;
|
S_TAP_LOCK = false;
|
||||||
}, 420);
|
}, 420);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user