clean code changes

This commit is contained in:
proddy
2019-09-23 18:16:52 +02:00
parent 8c779600a2
commit 0bf0377453
5 changed files with 27 additions and 73 deletions

View File

@@ -6,6 +6,8 @@ var utcSeconds;
var data = [];
var ajaxobj;
var custom_config = {};
var config = {
"command": "configfile",
"network": {
@@ -68,6 +70,14 @@ function syncBrowserTime() {
$("#ntp").click();
}
function handleNTPON() {
document.getElementById("forcentp").style.display = "block";
}
function handleNTPOFF() {
document.getElementById("forcentp").style.display = "none";
}
function listntp() {
websock.send("{\"command\":\"gettime\"}");
@@ -247,14 +257,6 @@ function handleAP() {
document.getElementById("inputtohide").style.display = "block";
}
function handleNTPON() {
document.getElementById("forcentp").style.display = "block";
}
function handleNTPOFF() {
document.getElementById("forcentp").style.display = "none";
}
function listnetwork() {
document.getElementById("inputtohide").value = config.network.ssid;
document.getElementById("wifipass").value = config.network.password;
@@ -435,16 +437,18 @@ function getContent(contentname) {
var customname2 = " " + ajaxobj.customname;
$("#customname2").text(customname2);
var elem;
if (config.network.wmode === 0) {
var elem = document.getElementById("helpurl");
var helpurl = ajaxobj.appurl + "/wiki"
elem = document.getElementById("helpurl");
var helpurl = ajaxobj.appurl + "/wiki";
elem.setAttribute("href", helpurl);
document.getElementById("helpurl").style.display = "block";
} else {
document.getElementById("helpurl").style.display = "none";
}
var elem = document.getElementById("appurl");
elem = document.getElementById("appurl");
elem.setAttribute("href", ajaxobj.appurl);
$("#appurl2").text(ajaxobj.appurl);