From 1ae7247213061a00cda2bcbe9f79edf87c9a724c Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Wed, 26 Jul 2017 22:09:22 -0400 Subject: [PATCH] Change success check to a more stable indicator Fixes #540 --- scripts/pi-hole/js/list.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/pi-hole/js/list.js b/scripts/pi-hole/js/list.js index 1b01387c..664d64b2 100644 --- a/scripts/pi-hole/js/list.js +++ b/scripts/pi-hole/js/list.js @@ -143,8 +143,7 @@ function add(arg) { method: "post", data: {"domain":domain.val(), "list":locallistType, "token":token}, success: function(response) { - if (response.indexOf("not a valid argument") >= 0 || - response.indexOf("is not a valid domain") >= 0) { + if (response.indexOf("] Pi-hole blocking is ") === -1) { alFailure.show(); err.html(response); alFailure.delay(4000).fadeOut(2000, function() {