Preparations for costume rules

+ Preparations for costume rules
- Feature "Report URLs"
+ Auto hash rules
+ Minimize rules length
+ Add start and end delimiters to rules
This commit is contained in:
Kevin Röbert
2019-03-12 18:13:23 +01:00
parent 81bc71de5e
commit 9c638c52f9
10 changed files with 541 additions and 140 deletions

View File

@@ -782,7 +782,7 @@ function setData(key, value)
break;
case "hashURL":
case "ruleURL":
storage[key] = replaceOldGithubURLs(value);
storage[key] = replaceOldURLs(value);
break;
case "types":
storage[key] = value.split(',');
@@ -860,7 +860,7 @@ function reload()
* Replace the old GitHub URLs with the
* new GitLab URLs.
*/
function replaceOldGithubURLs(url)
function replaceOldURLs(url)
{
switch (url) {
case "https://raw.githubusercontent.com/KevinRoebert/ClearUrls/master/data/rules.hash?flush_cache=true":