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.

  1. // ==UserScript==
  2. // @name Remove peyvandha.ir
  3. // @namespace Remove peyvandha.ir
  4. // @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.
  5. // @include *
  6. // @version 0.0.1.20150519151043
  7. // ==/UserScript==
  8.  
  9. var filters = ["http://10.10.34.34/"];
  10. var iframe = document.getElementsByTagName("iframe")[0];
  11. var loc = document.location;
  12.  
  13. for (var j = 0; j < filters.length; ++j) {
  14. if (iframe.src.indexOf(filters[j]) != -1) {
  15. var cache = "https://webcache.googleusercontent.com/search?q=cache:" + loc + "&hl=en";
  16. var text = document.createElement("p");
  17. 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.";
  18. iframe.parentNode.replaceChild(text, iframe);
  19. }
  20. }