Activate the exception function
This commit is contained in:
		
							parent
							
								
									24fade2850
								
							
						
					
					
						commit
						a5495594c1
					
				
							
								
								
									
										10
									
								
								clearurls.js
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								clearurls.js
									
									
									
									
									
								
							| 
						 | 
					@ -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,15 +161,15 @@ 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;
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user