From 631ed03e0258efd22261a8e274c6e90bc3159370 Mon Sep 17 00:00:00 2001 From: SrKomodo Date: Thu, 9 Aug 2018 18:41:03 -0300 Subject: [PATCH] Add youtube redirect --- README.md | 4 ++++ background.js | 4 ++++ test_urls.md | 2 ++ 3 files changed, 10 insertions(+) diff --git a/README.md b/README.md index a0b6565..2e1fa44 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,10 @@ tracking-enabled ones! https://steamcommunity.com/linkfilter/?url=https://getfedora.org/ is changed to: https://getfedora.org/ +- youtube redirect + https://www.youtube.com/redirect?v=aGmiw_rrNxk&redir_token=Gnf1R0dVxo7OgDNUteKqmC5AtbZ8MTUzMzkzNjY4NEAxNTMzODUwMjg0&event=video_description&q=https%3A%2F%2Feff.org + is changed to: + https://www.eff.org/ # Comparison to other add-ons Unlike other legacy add-ons like CleanLinks, Link Cleaner doesn't inject diff --git a/background.js b/background.js index 570310c..1247d09 100644 --- a/background.js +++ b/background.js @@ -171,6 +171,10 @@ const urls_to_param_mappers = [ }, { urls: ["*://steamcommunity.com/linkfilter/*"] + }, + { + urls: ["*://www.youtube.com/redirect*"], + param_name: 'q' } ]; diff --git a/test_urls.md b/test_urls.md index 2d4029d..4cce1cb 100644 --- a/test_urls.md +++ b/test_urls.md @@ -9,3 +9,5 @@ https://l.facebook.com/l.php?u=https%3A%2F%2Fwww.fsf.org%2Fcampaigns%2F&h=ATP1kf https://out.reddit.com/t3_5pq7qd?url=https%3A%2F%2Finternethealthreport.org%2Fv01%2F&token=AQAAZV6JWHBBnIcVjV1wvxVg5gKyCQQSdUhGIvuEUmdPZhxhm8kH&app_name=reddit.com https://steamcommunity.com/linkfilter/?url=https://getfedora.org/ + +https://www.youtube.com/redirect?v=aGmiw_rrNxk&redir_token=Gnf1R0dVxo7OgDNUteKqmC5AtbZ8MTUzMzkzNjY4NEAxNTMzODUwMjg0&event=video_description&q=https%3A%2F%2Feff.org