让Firefox使用Google网页快照
2007-02-02 10:40 | Filed Under Software |
由于众所周知的原因
在中国大陆不能直接使用Google提供的网页快照服务
刚才在水木NS版看了一些讨论解决了这个问题
发信人: mihiro (Lovely_mihiro), 信区: NewSoftware
标 题: Re: 为啥我的GOOGLE搜索,点击“网页快照”以后显示找不到服务
发信站: 水木社区 (Fri Feb 2 09:59:46 2007), 站内ip改为72.14.203.104
/search?q=cache: 改为/search?&q=cache:
就可以看了
需要做的就是让脚本来替我们自动完成这些操作
首先安装Firefox扩展:Greasemonkey
这是一个可以通过执行JS脚本来自定义客户端显示的插件
安装完插件重启FF,文件–打开文件,选择脚本安装即可
下载脚本:googlecache.user.js
脚本是网上找的,源代码如下:
- // --------------------------------------------------------------------
- //
- // This is a Greasemonkey user script.
- //
- // To install, you need Greasemonkey: http://greasemonkey.mozdev.org/
- // Then restart Firefox and revisit this script.
- // Under Tools, there will be a new menu item to "Install User Script".
- // Accept the default configuration and install.
- //
- // To uninstall, go to Tools/Manage User Scripts,
- // select "googlecache", and click Uninstall.
- //
- // --------------------------------------------------------------------
- //
- // WHAT IT DOES:
- // turn highlighted search terms into links to the next instance.
- // --------------------------------------------------------------------
- //
- // ==UserScript==
- // @name Google Cached Pages
- // @description Use different URLs to visit Google cached pages over China's Great Fire Wall (GFW)
- // @include http://*.google.*/search*
- // ==/UserScript==
- (function() {
- var allLinks = document.links;
- if (allLinks != null)
- {
- for (i = 0; i <allLinks.length; ++i)
- {
- if (allLinks [i].href.indexOf ("/search?q=cache:") > 0)
- {
- allLinks [i].href = allLinks [i].href.replace ("/search?q=cache:", "/search?&q=cache:");
- allLinks [i].href = allLinks [i].href.replace ("72.14.235.104", "72.14.203.104");
- }
- }
- }
- }
- )();
Greasemonkey貌似是个很强大的插件
嘿嘿以后可以弄些好玩的
标签:cache, firefox, google, Greasemonkey, 快照相关日志 随机文章
Comments
Leave a Reply

