From a5495594c1363065cce6da570079d15031f21fc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20R=C3=B6bert?= Date: Wed, 23 Aug 2017 15:21:09 +0200 Subject: [PATCH] Activate the exception function --- clearurls.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/clearurls.js b/clearurls.js index 7b65aea..6d41e28 100644 --- a/clearurls.js +++ b/clearurls.js @@ -116,7 +116,7 @@ function Provider(_name,_completeProvider = false){ * @return {String} ProviderURL as RegExp */ this.matchURL = function(url) { - return !(matchException(url)) && (url.match(urlPattern) != null) && (url.match(urlPattern).length > 0); + return !(this.matchException(url)) && (url.match(urlPattern) != null) && (url.match(urlPattern).length > 0); }; /** @@ -161,15 +161,15 @@ function Provider(_name,_completeProvider = false){ * @param {String} url RegExp as string * @return {boolean} if matching? true: false */ - matchException = function(url) { + this.matchException = function(url) { var result = false; for (var i = 0; i < exceptions.length; i++) { if(result) { break; } - - result = (url.match(new RegExp(exceptions[i], "gmi")) != null) && (url.match(new RegExp(exceptions[i], "gmi")).length > 0); - } + result = (url.match(new RegExp(exceptions[i], "gi"))) && (url.match(new RegExp(exceptions[i], "gi")).length > 0); + } + return result; }; }