简单两招绕过电信屏蔽访问Google cache(快照)

在祖国大陆的大部分地方都是不能访问Google cache的,而我经常需要查看一些cache,所以上网找到了这个处理办法

1 下载Firefox插件Greasemonkey

2 添加 Js

// This is a greasemonkey script, for use with the Firefox extension Greasemonkey.

// More info: http://greasemonkey.mozdev.org/

//

// ==UserScript==

// @name         Google Cache

// @version      1.0.1

// @author       sunwan

// @e-mail       [email protected]

// @description  Fix google cache to work in china

// @namespace    http://www.cnnj.8866.org/download/greasemonkey/

// @include      http://www.google.com/*

// @include      http://www.google.cn/*

// ==/UserScript==

var fixed = false;

document.addEventListener('click', catchEvent, true);

function catchEvent(e) {

   if ( /\/search\?q=cache:/.test(e.target.href) )   {

      e.preventDefault();               // disable click before fixed

   }

   if ( fixed ) {

      document.removeEventListener('click', catchEvent, true);

   }

}

function checkPage()   {

   if (/^http:\/\/www\.google\..+\/search\?/i.test(location.href))   {

      var els = document.getElementsByTagName("a");

      for (var i = 0; i < els.length; i++)   {

         try {

            if ( /^[^\/]+\/\/[^\/]+\/search\?q=cache:/.test(els[i].href) )   {      //is cache

               els[i].href = els[i].href.replace(/\/search\?q=cache:/,'/search?&wc=zf&q=cache:');// replace the href

            }

         } catch (e) {}

      }

      fixed = true;

   }

}

checkPage();