mirror of
https://github.com/pi-hole/web.git
synced 2026-04-24 10:50:23 +01:00
Use xo 0.53.0 and fix errors
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
@@ -77,7 +77,7 @@ function showAlert(type, icon, title, message) {
|
||||
var opts = {};
|
||||
title = " <strong>" + title + "</strong><br>";
|
||||
switch (type) {
|
||||
case "info":
|
||||
case "info": {
|
||||
opts = {
|
||||
type: "info",
|
||||
icon: "far fa-clock",
|
||||
@@ -86,7 +86,9 @@ function showAlert(type, icon, title, message) {
|
||||
};
|
||||
info = $.notify(opts);
|
||||
break;
|
||||
case "success":
|
||||
}
|
||||
|
||||
case "success": {
|
||||
opts = {
|
||||
type: "success",
|
||||
icon: icon,
|
||||
@@ -100,7 +102,9 @@ function showAlert(type, icon, title, message) {
|
||||
}
|
||||
|
||||
break;
|
||||
case "warning":
|
||||
}
|
||||
|
||||
case "warning": {
|
||||
opts = {
|
||||
type: "warning",
|
||||
icon: "fas fa-exclamation-triangle",
|
||||
@@ -114,7 +118,9 @@ function showAlert(type, icon, title, message) {
|
||||
}
|
||||
|
||||
break;
|
||||
case "error":
|
||||
}
|
||||
|
||||
case "error": {
|
||||
opts = {
|
||||
type: "danger",
|
||||
icon: "fas fa-times",
|
||||
@@ -128,6 +134,8 @@ function showAlert(type, icon, title, message) {
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
}
|
||||
}
|
||||
@@ -200,12 +208,12 @@ function validateIPv6CIDR(ip) {
|
||||
}
|
||||
|
||||
function validateMAC(mac) {
|
||||
var macvalidator = new RegExp(/^([\da-fA-F]{2}:){5}([\da-fA-F]{2})$/);
|
||||
var macvalidator = /^([\da-fA-F]{2}:){5}([\da-fA-F]{2})$/;
|
||||
return macvalidator.test(mac);
|
||||
}
|
||||
|
||||
function validateHostname(name) {
|
||||
var namevalidator = new RegExp(/[^<>;"]/);
|
||||
var namevalidator = /[^<>;"]/;
|
||||
return namevalidator.test(name);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user