Remove peyvandha.ir

Replaces the Islamic Republic of Iran censored content notice page with this message: "Content has been censored by the Islamic Republic of Iran!" and allows you to load the censored content from Google web cache.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name              Remove peyvandha.ir
// @namespace         Remove peyvandha.ir
// @description    Replaces the Islamic Republic of Iran censored content notice page with this message: "Content has been censored by the Islamic Republic of Iran!" and allows you to load the censored content from Google web cache.
// @include           *
// @version 0.0.1.20150519151043
// ==/UserScript==

var filters = ["http://10.10.34.34/"];
var iframe = document.getElementsByTagName("iframe")[0];
var loc = document.location;

for (var j = 0; j < filters.length; ++j) {
	if (iframe.src.indexOf(filters[j]) != -1) {
		var cache = "https://webcache.googleusercontent.com/search?q=cache:" + loc + "&hl=en";
		var text = document.createElement("p");
		text.innerHTML = "Content has been censored by the Islamic Republic of Iran! <a href = '" + cache + "'>Click here</a> to try loading it from Google web cache.";
		iframe.parentNode.replaceChild(text, iframe);
	}
}