Greasy Fork

Greasy Fork is available in English.

Privacy Redirector

Redirect social media platforms to their privacy respecting frontends

当前为 2021-11-30 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name Privacy Redirector
// @namespace https://gist.github.com/dybdeskarphet/daf54cab6b1f510097a88104bec2e690
// @license MIT
// @version 1.0
// @description	Redirect social media platforms to their privacy respecting frontends
// @description:tr Sosyal medya platformlarını, gizliliğe saygı duyan önyüzlerine yönlendirir
// @run-at document-start
// @match *://instagram.com/*
// @match *://*.instagram.com/*
// @match *://twitter.com/*
// @match *://*.twitter.com/*
// @match *://reddit.com/*
// @match *://*.reddit.com/*
// @match *://youtube.com/*
// @match *://*.youtube.com/*
// ==/UserScript==

function redirectInstagram() {
  if (window.location.pathname.indexOf("/p/") == 0) {
    window.stop(); // stop loading the window
    location.hostname = 'bibliogram.art';
  } else {
    let oldUrlPath  = window.location.pathname;
    let newURL  = window.location.protocol + "//" + "bibliogram.art" + "/u" + oldUrlPath + window.location.search + window.location.hash;
    
    window.location.replace (newURL);
  }
}

function redirectTwitter() {
	window.stop();
	location.hostname = "nitter.net";
}

function redirectReddit() {
	window.stop();
	location.hostname = "teddit.net";
}

function redirectYoutube() {
	window.stop();
	location.hostname = "invidious.snopyta.org";
}

var urlHostname = window.location.hostname;

switch (urlHostname) {
	case "www.instagram.com":
	  redirectInstagram();
	  break;
	
	case "twitter.com":
	  redirectTwitter();
	  break;

	case "www.reddit.com":
	  redirectReddit();
	  break;

	case "www.youtube.com":
	  redirectYoutube();
	  break;
}