Firefox3 beta3显示Google Reader的问题
2008-02-14 09:08 | Filed Under Html/JS/CSS, Software |
自从昨天beta3升级以来我的Google Reader显示就有问题,表现在日志部分无法显示出来
不过别人好像没这个问题,可能是因为我的语言设置是中文,使用的还是老版本的Reader的原因
写了个GreaseMonkey脚本解决了这个问题
// This is a greasemonkey script, for use with the Firefox extension Greasemonkey.
// More info: http://greasemonkey.mozdev.org/
//
// ==UserScript==
// @name Google Reader Display Fix
// @author Sunshow
// @e-mail sunshow@gmail.com
// @Version 0.5
// @description Google Reader display fix for firefox3 beta 3
// @include http://www.google.com/reader/*
// ==/UserScript==
var objTable = document.getElementById('viewer-box-table');
objTable.style.display = 'block';
标签:Google Reader, Greasemonkey, 脚本相关日志
让Firefox能在CPU论坛发帖的脚本
2007-12-20 14:23 | Filed Under Html/JS/CSS, Software |
CPU论坛,也就是传说中的鸟坛,扯淡休闲好去处
配合Firefox扩展Greasemonkey使用
安装完扩展重启FF,文件–打开文件,选择脚本安装即可
脚本下载:forum_cpu.zip
源代码如下:
- // This is a greasemonkey script, for use with the Firefox extension Greasemonkey.
- // More info: http://greasemonkey.mozdev.org/
- //
- // ==UserScript==
- // @name for CPU Forum
- // @author Sunshow
- // @e-mail sunshow@gmail.com
- // @Version 0.5
- // @description for CPU Forum
- // @include http://bbs.itdoor.net/forum/cpu/*
- // ==/UserScript==
- function pageChecker() {
- this.head = null;
- this.getHead = function() {
- this.head = document.getElementsByTagName("head")[0];
- if (this.head) return true; else return false;
- };
- // 取得script的文本
- this.getScriptText = function (oNode) {
- var s = "";
- var cs = oNode.childNodes;
- var l = cs.length;
- for (var i = 0; i < l; i++) {
- if ( cs[i].nodeType == 3 ) { //TEXT_NODE
- s += cs[i].nodeValue;
- }
- }
- return s;
- };
- this.go = function() {
- this.getHead();
- this.head.appendChild( this.createNewScript( this.checkfrmonsubmit.toString() ) );
- this.head.appendChild( this.createNewScript( this.checkfrmonsubmit1.toString() ) );
- }
- }
- // 创建一新script并返回其node
- pageChecker.prototype.createNewScript = function (str) {
- var newScript = document.createElement("script");
- newScript.setAttribute( "language", "javascript" );
- var sNode = document.createTextNode( str );
- newScript.appendChild( sNode );
- return newScript;
- };
- pageChecker.prototype.checkfrmonsubmit = function checkfrmonsubmit() {
- var forms = document.getElementsByName('cxkk');
- if (forms.length > 0) {
- var obj = forms[0];
- if (obj.title.value == '') {
- alert('请输入文章主题');
- return false;
- }
- obj.submit();
- obj.title.value = '';
- return true;
- }
- return false;
- };
- pageChecker.prototype.checkfrmonsubmit1 = function checkfrmonsubmit1() {
- var forms = document.getElementsByName('cxkk1');
- if (forms.length > 0) {
- var obj = forms[0];
- if (obj.title.value == '') {
- alert('请输入文章主题');
- return false;
- }
- obj.submit();
- obj.title.value = '';
- return true;
- }
- return false;
- };
- var pChecker = new pageChecker();
- pChecker.go();
相关日志
让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貌似是个很强大的插件
嘿嘿以后可以弄些好玩的
相关日志


