Activate the exception function

This commit is contained in:
Kevin Röbert 2017-08-23 15:21:09 +02:00
parent 24fade2850
commit a5495594c1

View File

@ -116,7 +116,7 @@ function Provider(_name,_completeProvider = false){
* @return {String} ProviderURL as RegExp * @return {String} ProviderURL as RegExp
*/ */
this.matchURL = function(url) { 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,13 +161,13 @@ function Provider(_name,_completeProvider = false){
* @param {String} url RegExp as string * @param {String} url RegExp as string
* @return {boolean} if matching? true: false * @return {boolean} if matching? true: false
*/ */
matchException = function(url) { this.matchException = function(url) {
var result = false; var result = false;
for (var i = 0; i < exceptions.length; i++) { for (var i = 0; i < exceptions.length; i++) {
if(result) { break; } 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; return result;