mirror of
https://github.com/pi-hole/web.git
synced 2025-12-26 13:36:22 +00:00
Do not try to load messages on the login page
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -475,10 +475,12 @@ $(function () {
|
||||
// Apply per-browser styling settings
|
||||
initCheckboxRadioStyle();
|
||||
|
||||
// Run check immediately after page loading ...
|
||||
utils.checkMessages();
|
||||
// ... and once again with five seconds delay
|
||||
setTimeout(utils.checkMessages, 5000);
|
||||
if (window.location.pathname !== "/admin/login.php") {
|
||||
// Run check immediately after page loading ...
|
||||
utils.checkMessages();
|
||||
// ... and once again with five seconds delay
|
||||
setTimeout(utils.checkMessages, 5000);
|
||||
}
|
||||
});
|
||||
|
||||
// Handle Enable/Disable
|
||||
|
||||
@@ -140,15 +140,16 @@ function fillDNSupstreams(value, servers) {
|
||||
var upstreams = $("#DNSupstreamsTextfield").val().split("\n");
|
||||
var customServers = 0;
|
||||
$("#DNSupstreamsTable input").each(function () {
|
||||
if (this.checked && !upstreams.includes(this.title)) {
|
||||
var title = $(this).closest("td").attr("title");
|
||||
if (this.checked && !upstreams.includes(title)) {
|
||||
// Add server to array
|
||||
upstreams.push(this.title);
|
||||
} else if (!this.checked && upstreams.includes(this.title)) {
|
||||
upstreams.push(title);
|
||||
} else if (!this.checked && upstreams.includes(title)) {
|
||||
// Remove server from array
|
||||
removeFromArray(upstreams, this.title);
|
||||
removeFromArray(upstreams, title);
|
||||
}
|
||||
|
||||
if (upstreams.includes(this.title)) customServers--;
|
||||
if (upstreams.includes(title)) customServers--;
|
||||
});
|
||||
// The variable will contain a negative value, we need to add the length to
|
||||
// get the correct number of custom servers
|
||||
|
||||
Reference in New Issue
Block a user