Index: files/whitelist.js |
=================================================================== |
deleted file mode 100644 |
--- a/files/whitelist.js |
+++ /dev/null |
@@ -1,13 +0,0 @@ |
-const whitelist = { |
- check: function(url) { |
- rules = lists.whitelist.get(); |
- for(i in rules) { |
- if(url.match(this.regex(rules[i]))) |
- return false; |
- } |
- return true; |
- }, |
- regex: function(rule) { |
- return RegExp(rule.replace(".","\\.").replace("*",".*").replace("[","\\[").replace("(","\\(").replace("||","[a-z]+://([a-z]+\\.){0,2}").replace("^","[!\"#$&'()*+,/:;<=>?@[\\]\\\\^`{}|~]")); |
- } |
-}; |