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")) {