treewide: fix http/https protocol on some packages (#8350)

Not tested, but this shouldn't affect anything.

Co-authored-by: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com>
This commit is contained in:
Beginner 2021-11-30 01:22:04 +08:00 committed by GitHub
parent d259439b3b
commit 6ca9a1b1a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View File

@ -14,16 +14,16 @@ XHR.poll(5, '<%=luci.dispatcher.build_url("admin/nas/amule/status")%>', null,
} else { } else {
tb.innerHTML = '<em><%:aMule daemon is not running.%></em>'; tb.innerHTML = '<em><%:aMule daemon is not running.%></em>';
} }
if (data.amuled_pid == "0") { if (data.amuled_pid == "0") {
btn.innerHTML = btn_tmpl.replace("PID: NUMBER", "<%:Start aMule%>"); btn.innerHTML = btn_tmpl.replace("PID: NUMBER", "<%:Start aMule%>");
} else { } else {
btn.innerHTML = btn_tmpl.replace("NUMBER", data.amuled_pid); btn.innerHTML = btn_tmpl.replace("NUMBER", data.amuled_pid);
} }
} }
} }
); );
function _data2elements(x, data) { function _data2elements(x, data) {
var btn = document.getElementById("btn_startstop"); var btn = document.getElementById("btn_startstop");
if ( ! btn ) { return; } // security check if ( ! btn ) { return; } // security check
@ -77,7 +77,7 @@ function openWebUI() {
} else { } else {
auth_port_value = auth_port.value auth_port_value = auth_port.value
}; };
var url = "http:" + localhostPath.substring(window.location.protocol.length) + ":" + auth_port_value; var url = localhostPath + ":" + auth_port_value;
window.open(url) window.open(url)
}; };
//]]> //]]>

View File

@ -25,7 +25,7 @@ function openClient() {
var pos = curWwwPath.indexOf(pathName); var pos = curWwwPath.indexOf(pathName);
var localhostPath = curWwwPath.substring(0, pos); var localhostPath = curWwwPath.substring(0, pos);
var clientPort = window.document.getElementById("cbid.baidupcs-web.config.port").value var clientPort = window.document.getElementById("cbid.baidupcs-web.config.port").value
var url = "http:" + localhostPath.substring(window.location.protocol.length) + ":" + clientPort; var url = localhostPath + ":" + clientPort;
window.open(url) window.open(url)
}; };
//]]> //]]>

View File

@ -20,7 +20,7 @@ function openClient() {
var pos = curWwwPath.indexOf(pathName); var pos = curWwwPath.indexOf(pathName);
var localhostPath = curWwwPath.substring(0, pos); var localhostPath = curWwwPath.substring(0, pos);
var clientPort = window.document.getElementById("cbid.verysync.config.port").value var clientPort = window.document.getElementById("cbid.verysync.config.port").value
var url = "http:" + localhostPath.substring(window.location.protocol.length) + ":" + clientPort; var url = localhostPath + ":" + clientPort;
window.open(url) window.open(url)
}; };
//]]> //]]>