收集了不少实用的Bookmarklet脚本代码
将这些代码添加到Bookmarklet(小书签)(IE叫收藏夹,chrome叫书签)里面,
像点击收藏夹的网址一样,点击这些添加好的Bookmarklet就能实现各种功能,简洁方便不占资源,算是绿色环保的小工具了
1.自动刷新
会调用一个叫"刷刷"的网站实现自动刷新- javascript:location.href = 'http://www.suasua.com/?url=' + location.href;
复制代码类似于M2中的功能
9.破解限制- javascript:alert(document.body.oncontextmenu=document.body.onmouseup=document.body.onmousemove=document.body.onclick=document.body.onselectstart =document.body.oncopy=document.onmousedown = document.onkeydown =null)
复制代码可以破解右键限制和复制限制,有M2中"清除烦恼"的功能
-----------------------------------------------------------------------------------------------------------------------
PageZipper 自动翻页
- javascript:(function(){if(window['pgzp']){_pgzpToggleBookmarklet();}else{window._page_zipper_is_bookmarklet=true;window._page_zipper=document.createElement('script');window._page_zipper.type='text/javascript';window._page_zipper.src='http://www.printwhatyoulike.com/static/pagezipper/pagezipper_10.js';document.getElementsByTagName('head')[0].appendChild(window._page_zipper);}})();
复制代码
google页面翻译工具栏 类似chrome的扩展- javascript:{d=document;b=d.body;o=d.createElement('scri'+'pt');o.setAttribute('src','http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit');o.setAttribute('type','text/javascript');b.appendChild(o);v=b.insertBefore(d.createElement('div'),b.firstChild);v.id='google_translate_element';v.style.display='none';p=d.createElement('scri'+'pt');p.text='function%20googleTranslateElementInit(){new%20google.translate.TranslateElement({pageLanguage:%22%22},%22google_translate_element%22);}';p.setAttribute('type','text/javascript');b.appendChild(p);}void%200
复制代码
Google翻译页面至简体中文- javascript:(function(){var%20t=((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection&&document.selection.createRange&&document.selection.createRange().text));var%20e=(document.charset||document.characterSet);if(t!=''){window.open('http://translate.google.cn/translate_t?hl=zh-CN#auto|zh-CN|'+t);}else{window.open('http://translate.google.cn/translate?u='+escape(location.href)+'&hl=zh-CN&ie='+e+'&sl=auto&tl=zh-CN');};})();
复制代码
划词翻译小D划词 ,可翻译英文、日文- javascript:void((function(){hjelm=document.createElement('script');hjelm.setAttribute('src','http://dict.hjenglish.com/js/dict.js');document.body.appendChild(hjelm);})())
复制代码
Dict划词助手- javascript:void((function() {var element=document.createElement('script'); element.setAttribute('src', 'http://dict.cn/hc/init.php'); document.body.appendChild(element);})())
复制代码
尚译, 翻译多种语言- javascript:void((function(){if(window.Como&&window.Como.someyi){Como.someyi.open()}else{var a=document.createElement('script');a.setAttribute('type','text/javascript');var b=document.charset?document.charset:document.characterSet;var c=b.toLowerCase()=='gb2312'?'pack-gb2312.js':'pack-utf8.js';a.setAttribute('src','http://yi.comsome.com/'+c);document.getElementsByTagName('head').item(0).appendChild(a);Text.prototype.tagName='#text'}})())
复制代码
QQWeb云输入法- javascript:(function(q){!!q?q.toggle():(function(d,j){j=d.createElement('script');j.src='//ime.qq.com/fcgi-bin/getjs';j.setAttribute('ime-cfg','lt=2');d.getElementsByTagName('head')[0].appendChild(j)})(document)})(window.QQWebIME)
复制代码
添加到QQ书签- javascript:{window.open('http://shuqian.qq.com/post?from=3&title='+encodeURIComponent(document.title)+'&uri='+encodeURIComponent(document.location.href)+'&jumpback=2&noui=1','favit','width=930,height=470,left=50,top=50,toolbar=no,menubar=no,location=no,scrollbars=yes,status=yes,resizable=yes');void(0)}
复制代码
Google站内搜索- javascript:var%20ax=prompt('%E8%B0%B7%E6%AD%8C%E7%AB%99%E5%86%85%E6%90%9C%E7%B4%A2\n%E8%AF%B7%E8%BE%93%E5%85%A5%E6%90%9C%E7%B4%A2%E5%85%B3%E9%94%AE%E5%AD%97','');if(ax.length>0){window.open('http://www.google.com/search?hl=zh-CN&client=opera&q=site:'+encodeURIComponent(location.hostname)+'%20'+encodeURIComponent(ax))};void(0)
复制代码
生成短网址
javascript:function iprl5(){var d=document,z=d.createElement('scr'+'ipt'),b=d.body,l=d.location;try{if(!b)throw(0);if (!l) {alert('请输入网址!');return;}d.title='(Shortening...) '+d.title;z.setAttribute('src','http://www.ruanyifeng.com/webapp/url_shortener_plugin.php?longUrl='+encodeURIComponent(l));b.appendChild(z);}catch(e){alert('请等待网页加载完毕!');}}iprl5();void(0)
十个浏览器 Bookmarklets : http://blog.istef.info/2007/06/15/google-bookmarkets/