Merge pull request #8 from liam-h/main
Added Libremdb support for "title" pages only
This commit is contained in:
commit
6e7f967d1a
1 changed files with 25 additions and 1 deletions
|
@ -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
|
||||
|
@ -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,25 @@ function redirectWikipedia() {
|
|||
}
|
||||
}
|
||||
|
||||
function redirectImdb() {
|
||||
if (redirect_imdb == false) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (window.location.pathname.startsWith("/title/")) {
|
||||
window.stop();
|
||||
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 +339,10 @@ switch (urlHostname) {
|
|||
case "www.reuters.com":
|
||||
redirectReuters();
|
||||
break;
|
||||
|
||||
case "www.imdb.com":
|
||||
redirectImdb();
|
||||
break;
|
||||
}
|
||||
|
||||
if (urlHostname.includes("medium.com")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue