小技巧:用简单的js语句定制自己的Chrome“插件”
方便了站长们使用Chrome查看网站的各种参数,即时了解网站等收录情况等!方便了站长们使用Chrome查看网站的各种参数,即时了解网站等收录情况等!由于浏览器语言和编码不同,只修改了部分js语句,并未全部测试通过,有问题可发帖询问!以下由Chrome123.net翻译:
使用方法:把以下各js存在收藏夹里面,随时调用(建议放在书签栏)
Google Cache —— 查看当前域名的缓存页面,不经常使用(如果要查看当前网址的缓存页面则需要修改正则表达式)
将其存为书签:
javascript:void((function(){var%20a=location.href.replace(/^http%5C:%5C/%5C/(.*)%5C/$/,"$1");location.href="http://www.google.com/search?hl=zh-CN&q=cache:"+escape(a);})())
Google Links —— 查看当前域名的反向链接
将其存为书签:
javascript:void((function(){var%20a=location.href.replace(/^http%5C:%5C/%5C/(.*)%5C/$/,"$1");location.href="http://www.google.com/search?hl=zh-CN&q=link:"+escape(a);})())
Google Site —— 查看当前域名的收录情况
将其存为书签:
javascript:void((function(){var%20a=location.href.replace(/^http%5C:%5C/%5C/(.*)%5C/$/,"$1");location.href="http://www.google.com/search?q=site:"+escape(a);})())
Search for URL —— 搜索当前URL
将其存为书签:
javascript:void((function(){var%20a=location.href.replace(/^http%5C:%5C/%5C/(.*)$/,"$1");location.href="http://www.google.com/search?hl=zh-CN&q="+escape(a);})())
Google Images from Site —— 搜索当前域名中的图片
将其存为书签:
javascript:void((function(){var%20a=location.href.replace(/^http%5C:%5C/%5C/(.*)%5C/$/,"$1");location.href="http://images.google.com/images?hl=zh-CN&q="+escape(a);})())
Google Info —— 查找当前域名相关的信息(列表)
将其存为书签:
javascript:void((function(){var%20a=location.href.replace(/^http%5C:%5C/%5C/(.*)%5C/$/,"$1");location.href="http://www.google.com/search?q=info:"+escape(a);})())
Related Sites/Pages —— related命令
将其存为书签:
javascript:void((function(){var%20a=location.href.replace(/^http%5C:%5C/%5C/(.*)%5C/$/,"$1");location.href="http://www.google.com/search?q=related:"+escape(a);})())
Translate Page to English —— 把页面翻译成英文,同理可以将页面翻译成中文
将其存为书签:
javascript:var%20t=((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection%20&&document.selection.createRange&&document.selection.createRange().text));var%20e=(document.charset||document.characterSet);if(t!=”){location.href=’http://translate.google.com/translate_t?text=’+t+’&hl=en&tbb=1&ie=’+e;}else{location.href=’http://translate.google.com/translate?u=’+escape(location.href)+’&hl=en&tbb=1&ie=’+e;};
Pages Indexed in Yahoo —— 当前域名在yahoo中的索引
将其存为书签:
javascript:void((function(){var%20a=location.href.replace(/^http%5C:%5C/%5C/(.*)%5C/$/,"$1");location.href="http://search.yahoo.com/search?p="+escape(a);})())
Yahoo Backlinks ——当前页面在yahoo中的反向链接 将其存为书签:
javascript:location.href=’http:/’+’/search.yahoo.com/search?p=linkdomain%3A’+document.domain.replace(‘www.’,”)+’%20-site%3a’+document.domain.replace(‘www.’,”)+’&%23038;n=100′;
Pages Indexed in MSN —— 当前域名在msn中的索引
将其存为书签:
javascript:void((function(){var%20a=location.href.replace(/^http%5C:%5C/%5C/(.*)$/,"$1");location.href="http://search.msn.com/results.aspx?q=site:"+escape(a);})())
Yahoo Directory —— yahoo目录?
将其存为书签:
javascript:void((function(){var%20a=location.href.replace(/^http%5C:%5C/%5C/(.*)%5C/$/,"$1");location.href="http://search.yahoo.com/search/dir?h=c&p="+escape(a);})())
Alexa Rank —— 不用说了,alexa排名!
将其存为书签:
javascript:void((function(){var%20a=location.href.replace(/^http%5C:%5C/%5C/(.*)%5C/$/,"$1");location.href="http://alexa.com/data/details/traffic_details?q=&url="+escape(a);})())
Compete.com Details —— 应该是在compete.com中的搜索结果
将其存为书签:
javascript:void((function(){var%20a=location.href.replace(/^http%5C:%5C/%5C/(.*)%5C/$/,"$1");location.href="http://siteanalytics.compete.com/"+escape(a);})())
Archive.org —— 在archive.org中的搜索结果
将其存为书签:
javascript:void((function(){var%20a=location.href.replace(/^http%5C:%5C/%5C/(.*)%5C/$/,"$1");location.href="http://web.archive.org/web/*/"+escape(a);})())
Delicious Bookmarks —— 著名的在线收藏夹
将其存为书签:
javascript:void((function(){var%20a=location.href.replace(/^http%5C:%5C/%5C/(.*)%5C/$/,"$1");location.href="http://del.icio.us/url/check?url="+escape(a);})())
Technorati —— 貌似是一个rss订阅平台
将其存为书签:
javascript:void((function(){var%20a=location.href.replace(/^http%5C:%5C/%5C/(.*)%5C/$/,"$1");location.href="http://technorati.com/search/"+escape(a);})())
URL Mentions on Digg ——鼎鼎有名的Digg
将其存为书签:
javascript:void((function(){var%20a=location.href.replace(/^http%5C:%5C/%5C/(.*)%5C/$/,"$1");location.href="http://digg.com/search?area=all&age=all&sort=new&type=all&s="+escape(a);})())
DomainTools Domain Lookup —— 有名的域名查询,国内一般不用这个!
将其存为书签:
javascript:void((function(){var%20a=location.href.replace(/^http%5C:%5C/%5C/(.*)%5C/$/,"$1");location.href="http://whois.domaintools.com/"+escape(a);})())
Validate Page HTML at W3C —— 页面html的w3c验证
将其存为书签:
javascript:location.href=’http://validator.w3.org/check?uri=’%20+%20document.location.href%20+%20%20 ‘&doctype=Inline’;
Validate Page CSS at W3C —— 页面css 的w3c验证
将其存为书签:
javascript:javascript:location.href=’http://jigsaw.w3.org/css-validator/validator?uri=’%20+%20document.location.href;
Highlight Nofollow Links Red —— 高亮显示 nofollow链接
将其存为书签:
javascript:var%20t=document.getElementsByTagName(‘a’);for(i=0;i<t.length;i++){if(t.rel.toLowerCase()==’nofollow’){void(t.style.color=’red’);}}
Show Domains Robots.txt ——查看网站根目录的robots.txt文件 将其存为书签:
javascript:void(location.href=’http://’%20+%20location.host%20+%20’/robots.txt’)
Page Last Modified Date ——页面最新的修改时间 将其存为书签:
javascript:if(frames.length<1){alert(‘The%20server%20indicates%20that%20the%20page%20was%20last%20modified:%20’%20+%20window.document.lastModified)}
Number of Links on a Page —— 现有页面上有多少个链接 将其存为书签:
javascript:if(frames.length<1){alert(‘This%20page% 20has%20’%20+%20document.links.length%20+%20’%20links.’)}
本文固定链接: http://www.nuniao.com/tip-customize-your-chrome-with-simple-js-statement-plugins.html | 驽鸟公寓
这办法倒不错…放书签栏里挺方便
2008-09-21 4:29 下午