From ffe53f3a65e62ca8915c4e8416b2c04a47d5e8eb Mon Sep 17 00:00:00 2001 From: liam-h <71707327+liam-h@users.noreply.github.com> Date: Thu, 22 Sep 2022 00:31:30 +0200 Subject: [PATCH 1/2] Added Libremdb support for "title" pages only --- privacy-redirector.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/privacy-redirector.js b/privacy-redirector.js index 4c1f1e3..2c6f767 100644 --- a/privacy-redirector.js +++ b/privacy-redirector.js @@ -52,6 +52,7 @@ var redirect_hackernews = true; var redirect_gtranslate = true; var redirect_reuters = true; var redirect_wikipedia = true; +var redirect_imdb = true; // // // // // // // // // // // // // @@ -277,6 +278,26 @@ function redirectWikipedia() { } } +function redirectImdb() { + if (redirect_imdb == false) { + return; + } + + window.stop(); + + if (window.location.pathname.startsWith("/title/")) { + let newURL = + window.location.protocol + + "//" + + farsideInstance + + "/libremdb" + + window.location.pathname + + window.location.search + + window.location.hash; + window.location.replace(newURL); + } +} + let urlHostname = window.location.hostname; switch (urlHostname) { @@ -319,6 +340,10 @@ switch (urlHostname) { case "www.reuters.com": redirectReuters(); break; + + case "www.imdb.com": + redirectImdb(); + break; } if (urlHostname.includes("medium.com")) { From a80831017d0d2612afe4c510e6d13c6008f143a1 Mon Sep 17 00:00:00 2001 From: liam-h <71707327+liam-h@users.noreply.github.com> Date: Thu, 22 Sep 2022 00:47:26 +0200 Subject: [PATCH 2/2] Fixed Libremdb Support --- privacy-redirector.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/privacy-redirector.js b/privacy-redirector.js index 2c6f767..fbf50bf 100644 --- a/privacy-redirector.js +++ b/privacy-redirector.js @@ -4,7 +4,7 @@ // @name:de Datenschutz Umleiter // @namespace https://github.com/dybdeskarphet/privacy-redirector // @license GPLv3 -// @version 1.2.9 +// @version 1.2.10 // @description Redirect social media platforms to their privacy respecting frontends // @description:tr Sosyal medya platformlarını, gizliliğe saygı duyan önyüzlerine yönlendirir // @description:de Leitet von Social-Media-Plattformen auf deren jeweilige datenschutzfreundlicheren Frontends @@ -283,9 +283,8 @@ function redirectImdb() { return; } - window.stop(); - if (window.location.pathname.startsWith("/title/")) { + window.stop(); let newURL = window.location.protocol + "//" +