From 8182a0da57f784d4d44fa02affb8e69e49fb268f Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Fri, 19 Aug 2016 20:02:08 -0400 Subject: [PATCH] Show failure message if domain was invalid --- js/pihole/list.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/pihole/list.js b/js/pihole/list.js index 652607b5..3f2e2d74 100644 --- a/js/pihole/list.js +++ b/js/pihole/list.js @@ -85,7 +85,8 @@ function add() { method: "post", data: {"domain":domain.val(), "list":list_type, "token":token}, success: function(response) { - if (response.indexOf("not a valid argument")>=0) { + if (response.indexOf("not a valid argument") >= 0 || + response.indexOf("is not a valid domain") >= 0) { alFailure.show(); alFailure.delay(1000).fadeOut(2000, function() { alFailure.hide();