Privacy Frontend Redirect

Redirect to privacy friendly front-ends of popular services.

当前为 2023-01-26 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        Privacy Frontend Redirect
// @namespace   Privacy Frontend Redirect
// @match       *://*youtube.com/*
// @match       *://*youtu.be/*
// @match       *://*twitter.com/*
// @match       *://*reddit.com/*
// @match       *://*imgur.com/*
// @match       *://*instagram.com/*
// @match       *://*tiktok.com/*
// @match       *://*imdb.com/*
// @match       *://*fandom.com/*
// @grant       none
// @version     1.0
// @author      NoUser
// @description Redirect to privacy friendly front-ends of popular services.
// @run-at      document-start
// @license MIT
// ==/UserScript==

// YouTube
const yt = ["https://piped.tokhmi.xyz/", "https://piped.mha.fi/", "https://piped.syncpundit.io/", "https://yewtu.be/", "https://vid.puffyan.us/", "https://inv.riverside.rocks/", "https://inv.vern.cc/", "https://invidious.snopyta.org/"]
const ryt = yt[Math.floor(Math.random() * yt.length)];

if (window.location.href.match(/^https:\/\/www.youtube\.com\/watch\?v=*/)) { window.location.replace(ryt + window.location.href.substr(24,)) }

if (window.location.href.match(/^https:\/\/m.youtube\.com\/watch\?v=*/)) { window.location.replace(ryt + window.location.href.substr(24,)) }

if (window.location.href.match(/^https:\/\/youtu\.be\/*/)) { window.location.replace(ryt + window.location.href.substr(16,)) }

// Twitter
const twt = ["https://nitter.sneed.network", "https://canada.unofficialbird.com", "https://nitter.privacytools.io", "https://nitter.foss.wtf", "https://nitter.privacy.com.de", "https://nitter.1d4.us", "https://nitter.pussthecat.org", "https://nitter.poast.org", "https://twitter.censors.us"]
const rtwt = twt[Math.floor(Math.random() * twt.length)];

if (window.location.href.match(/^https:\/\/twitter\.com\//)) { window.location.replace(rtwt + window.location.pathname) }

if (window.location.href.match(/^https:\/\/mobile\.twitter\.com\//)) { window.location.replace(rtwt + window.location.pathname) }

// Reddit
const red = ["https://libreddit.eu.org", "https://libreddit.spike.codes", "https://lr.odyssey346.dev", "https://rd.funami.tech", "https://libreddit.dcs0.hu", "https://lr.vern.cc", "https://www.troddit.com"]
const rred = red[Math.floor(Math.random() * red.length)];

if (window.location.href.match(/^https:\/\/www\.reddit\.com\//)) { window.location.replace(rred + window.location.pathname) }

// Imgur
const img = ["https://rimgo.pussthecat.org", "https://rimgo.totaldarkness.net", "https://rimgo.vern.cc", "https://imgur.artemislena.eu", "https://rimgo.privacydev.net", "https://rimgo.bus-hit.me"]
const rimg = img[Math.floor(Math.random() * img.length)];

if (window.location.href.match(/^https:\/\/imgur\.com\//)) { window.location.replace(rimg + window.location.pathname) }

// Instagram
const ins = ["https://bibliogram.froth.zone", "https://ig.tokhmi.xyz", "https://bibliogram.priv.pw"]
const rins = ins[Math.floor(Math.random() * ins.length)];

if (window.location.href.match(/^https:\/\/instagram\.com\//)) { window.location.replace(rins + window.location.pathname) }

// TikTok
const tik = ["https://proxitok.pussthecat.org", "https://proxitok.esmailelbob.xyz", "https://tok.habedieeh.re", "https://tok.artemislena.eu", "https://proxitok.privacydev.net", "https://proxitok.manasiwibi.com"]
const rtik = tik[Math.floor(Math.random() * tik.length)];

if (window.location.href.match(/^https:\/\/tiktok\.com\//)) { window.location.replace(rtik + window.location.pathname) }

// IMDB
const imd = ["https://ld.vern.cc", "https://libremdb.esmailelbob.xyz", "https://lmdb.tokhmi.xyz", "https://libremdb.iket.me", "https://libremdb.pussthecat.org"]
const rimd = imd[Math.floor(Math.random() * imd.length)];

if (window.location.href.match(/^https:\/\/www\.imdb\.com\//)) { window.location.replace(rimd + window.location.pathname) }

// Fandom
const fan = ["https://bw.vern.cc", "https://breezewiki.esmailelbob.xyz", "https://bw.artemislena.eu", "https://breezewiki.pussthecat.org"]
const rfan = fan[Math.floor(Math.random() * fan.length)];
var sub = window.location.host.split('.')[0]

if (window.location.href.match(/^https:\/\/(.+)?\.fandom\.com\//)) { window.location.replace(rfan + "/" + sub + window.location.pathname) }