about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorManeraKai <manerakai@protonmail.com>2023-06-12 12:43:59 +0300
committerGitHub <noreply@github.com>2023-06-12 12:43:59 +0300
commit28fb6733f543883ae700d2ab96a46d50d143ce81 (patch)
tree0adaad86371819e5e2617839be7e5a0aa2d8cba8 /src
parentAdded language support for Quetre https://github.com/libredirect/browser_exte... (diff)
parentMade groups "capturing" to make them lightweighter (diff)
downloadlibredirect-28fb6733f543883ae700d2ab96a46d50d143ce81.zip
Merge pull request #738 from NoPlagiarism/www_regex_improve
WWW regex improve
Diffstat (limited to 'src')
-rw-r--r--src/config.json26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/config.json b/src/config.json
index a465f62e..d769b303 100644
--- a/src/config.json
+++ b/src/config.json
@@ -85,12 +85,12 @@
 			},
 			"targets": [
 				"^https?:\\/{2}redirect\\.invidious\\.io\\/.*",
-				"^https?:\\/{2}(?:www\\.|m\\.|)youtube.com(\\/|$)(?!iframe_api\\/|redirect\\/)",
+				"^https?:\\/{2}(www\\.|m\\.)?youtube.com(\\/|$)(?!iframe_api\\/|redirect\\/)",
 				"^https?:\\/{2}img\\.youtube.com\\/vi\\/.*\\/..*",
-				"^https?:\\/{2}(?:i|s)\\.ytimg.com\\/vi\\/.*\\/..*",
-				"^https?:\\/{2}(?:www\\.|)youtube.com\\/watch?v=..*",
-				"^https?:\\/{2}youtu\\.be\\/..*",
-				"^https?:\\/{2}(?:www\\.|)(youtube|youtube-nocookie)\\.com\\/embed\\/..*"
+				"^https?:\\/{2}(i|s)\\.ytimg.com\\/vi\\/.*\\/..*",
+				"^https?:\\/{2}(www\\.)?youtube.com\\/watch?v=..*",
+				"^https?:\\/{2}(www\\.)?youtu\\.be\\/..*",
+				"^https?:\\/{2}(www\\.)?(youtube|youtube-nocookie)\\.com\\/embed\\/..*"
 			],
 			"name": "YouTube",
 			"options": {
@@ -140,8 +140,8 @@
 				}
 			},
 			"targets": [
-				"^https?:\\/{2}(www\\.|mobile\\.|)twitter\\.com(\\/|$)",
-				"^https?:\\/{2}(pbs\\.|video\\.|)twimg\\.com(\\/|$)",
+				"^https?:\\/{2}(www\\.|mobile\\.)?twitter\\.com(\\/|$)",
+				"^https?:\\/{2}(pbs\\.|video\\.)twimg\\.com(\\/|$)",
 				"^https?:\\/{2}platform\\.twitter\\.com/embed(\\/|$)",
 				"^https?:\\/{2}t\\.co(\\/|$)"
 			],
@@ -167,7 +167,7 @@
 				}
 			},
 			"targets": [
-				"^https?:\\/{2}(www\\.|)tiktok\\.com(\\/|$)"
+				"^https?:\\/{2}(www\\.)?tiktok\\.com(\\/|$)"
 			],
 			"name": "TikTok",
 			"options": {
@@ -196,7 +196,7 @@
 				}
 			},
 			"targets": [
-				"^https?:\\/{2}(www\\.|old\\.|np\\.|new\\.|amp\\.|)(reddit|reddittorjg6rue252oqsxryoxengawnmo46qy4kyii5wtqnwfj4ooad)\\.(com|onion)(?=\\/u(ser)?\\/|\\/r\\/|\\/search|\\/new|\\/?$)",
+				"^https?:\\/{2}(www\\.|old\\.|np\\.|new\\.|amp\\.)?(reddit|reddittorjg6rue252oqsxryoxengawnmo46qy4kyii5wtqnwfj4ooad)\\.(com|onion)(?=\\/u(ser)?\\/|\\/r\\/|\\/search|\\/new|\\/?$)",
 				"^https?:\\/{2}(i|(external-)?preview)\\.redd\\.it"
 			],
 			"name": "Reddit",
@@ -312,7 +312,7 @@
 				}
 			},
 			"targets": [
-				"^https?:\\/{2}(?:www\\.|m\\.|)imdb\\.com"
+				"^https?:\\/{2}(www\\.|m\\.)?imdb\\.com"
 			],
 			"name": "IMDb",
 			"options": {
@@ -334,7 +334,7 @@
 				}
 			},
 			"targets": [
-				"^https?:\\/{2}(?:[a-zA-Z0-9-]+\\.)?(?:fandom|wikia)\\.com(?=\\/wiki|\\/?$)"
+				"^https?:\\/{2}([a-zA-Z0-9-]+\\.)?(fandom|wikia)\\.com(?=\\/wiki|\\/?$)"
 			],
 			"name": "Fandom",
 			"options": {
@@ -596,7 +596,7 @@
 				}
 			},
 			"targets": [
-				"^https?:\\/{2}?stackoverflow\\.com\\/",
+				"^https?:\\/{2}(www\\.)?stackoverflow\\.com\\/",
 				"^https?:\\/{2}([a-zA-Z0-9-]+\\.)?stackexchange\\.com\\/"
 			],
 			"name": "Stack Overflow",
@@ -642,7 +642,7 @@
 				}
 			},
 			"targets": [
-				"^https?:\\/{2}(?:[a-z]+\\.)*wikipedia\\.org\\/?"
+				"^https?:\\/{2}([a-z]+\\.)*wikipedia\\.org\\/?"
 			],
 			"name": "Wikipedia",
 			"options": {