From 2f646dbdb0c297d25a7300804f305df3f87b3cee Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Mon, 24 Oct 2022 12:37:04 -0400 Subject: [PATCH] Pull reference Easylist assests from own repo --- assets/assets.json | 8 ++------ assets/resources/scriptlets.js | 4 +++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/assets/assets.json b/assets/assets.json index ec70df99e..6840299b7 100644 --- a/assets/assets.json +++ b/assets/assets.json @@ -176,12 +176,10 @@ "group": "ads", "title": "EasyList", "contentURL": [ - "https://secure.fanboy.co.nz/easylist.txt", - "https://easylist.to/easylist/easylist.txt", + "https://ublockorigin.github.io/uAssets/thirdparties/easylist.txt", "assets/thirdparties/easylist-downloads.adblockplus.org/easylist.txt" ], "cdnURLs": [ - "https://secure.fanboy.co.nz/easylist.txt", "https://gitcdn.link/cdn/uBlockOrigin/uAssetsCDN/main/thirdparties/easylist.txt", "https://cdn.jsdelivr.net/gh/uBlockOrigin/uAssetsCDN@main/thirdparties/easylist.txt", "https://cdn.statically.io/gh/uBlockOrigin/uAssetsCDN/main/thirdparties/easylist.txt", @@ -228,12 +226,10 @@ "group": "privacy", "title": "EasyPrivacy", "contentURL": [ - "https://secure.fanboy.co.nz/easyprivacy.txt", - "https://easylist.to/easylist/easyprivacy.txt", + "https://ublockorigin.github.io/uAssets/thirdparties/easyprivacy.txt", "assets/thirdparties/easylist-downloads.adblockplus.org/easyprivacy.txt" ], "cdnURLs": [ - "https://secure.fanboy.co.nz/easyprivacy.txt", "https://gitcdn.link/cdn/uBlockOrigin/uAssetsCDN/main/thirdparties/easyprivacy.txt", "https://cdn.jsdelivr.net/gh/uBlockOrigin/uAssetsCDN@main/thirdparties/easyprivacy.txt", "https://cdn.statically.io/gh/uBlockOrigin/uAssetsCDN/main/thirdparties/easyprivacy.txt", diff --git a/assets/resources/scriptlets.js b/assets/resources/scriptlets.js index 190ae3fd7..bb41e369b 100644 --- a/assets/resources/scriptlets.js +++ b/assets/resources/scriptlets.js @@ -1754,7 +1754,9 @@ const regexFromArg = arg => { if ( arg === '' ) { return /^/; } if ( /^\/.*\/$/.test(arg) ) { return new RegExp(arg.slice(1, -1)); } - return new RegExp(arg.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')); + return new RegExp( + arg.replace(/[.+?^${}()|[\]\\]/g, '\\$&').replace(/\*+/g, '.*?') + ); }; const reM3u = regexFromArg(m3uPattern); const reUrl = regexFromArg(urlPattern);