本帖最后由 仙梦々幻剑 于 2013-3-22 14:29 编辑
Bookmarklet
俗称小书签,是用JavaScript编写的小程序,安装方法就像收藏网页到收藏栏一样简单。
以下是我从网上收集来的书签小程序 ,各大浏览器通用,IE浏览器可以为每个书签设置快捷键,超速浏览器就需要用到Shortcut Manager扩展。
⑴.翻译类:
有道全文翻译:- javascript: void((function() {var element = document.createElement('script');element.id = 'outfox_seed_js';element.charset = 'utf-8',element.setAttribute('src', 'http://fanyi.youdao.com/web2/seed.js?' + Date.parse(new Date()));document.body.appendChild(element);})())
复制代码 谷歌全文翻译:- javascript:(function(){ document.location.href='http:/和谐/translate.google.com/translate?u='+escape(document.location.href) })();
复制代码 bing全文翻译:- javascript:(function(){var s = document.createElement('script'); s.type = 'text/javascript'; s.src =
- 'http://labs.microsofttranslator.com/bookmarklet/default.aspx?f=js&to=zh-chs'; document.body.insertBefore(s, document.body.firstChild);})()
复制代码 尚译划词翻译:- javascript:void((function(){if(window.Como&&window.Como.someyi){Como.someyi.open()}else{var%20a=document.createElement('script');a.setAttribute('type','text/javascript');var%20b=document.charset?document.charset:document.characterSet;var%20c=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'}})())
复制代码 海词划词翻译:- javascript:void((function() {var element=document.createElement('script'); element.setAttribute('src',
- 'http://dict.cn/hc/init.php'); document.body.appendChild(element);})())
复制代码 汉典划词搜索:- javascript:void((function()%20{var%20element=document.createElement('script');%20element.setAttribute('src',%20'http://www.zdic.net/tools/xzsy/');%20document.body.appendChild(element);})())
复制代码 繁简转换:- javascript:(function(){var s=document.getElementById("tongwenlet_cn");if(s!=null){document.body.removeChild(s);}var s=document.createElement("script");s.language="javascript";s.type="text/javascript";s.src="http://tongwen.openfoundry.org/NewTongWen/tools/bookmarklet_cn.js";s.id="tongwenlet_cn";document.body.appendChild(s); })();
复制代码 ⑵.搜索类:
左右分屏浏览:- javascript:document.write('<HTML><HEAD></HEAD><FRAMESET COLS=\'50%25,*\'><FRAME SRC=' + location.href + '><FRAME SRC=' + location.href + '></FRAMESET></HTML>')
复制代码 上下分屏浏览:- javascript:document.write('<HTML><HEAD></HEAD><FRAMESET ROWS=\'50%25,*\'><FRAME SRC=' + location.href + '><FRAME SRC=' + location.href + '></FRAMESET></HTML>')
复制代码 readability网页阅读:- javascript:(%28function%28%29%7Bwindow.baseUrl%3D%27http%3A//www.readability.com%27%3Bwindow.readabilityToken%3D%27%27%3Bvar s%3Ddocument.createElement%28%27script%27%29%3Bs.setAttribute%28%27type%27%2C%27text/javascript%27%29%3Bs.setAttribute%28%27charset%27%2C%27UTF-8%27%29%3Bs.setAttribute%28%27src%27%2CbaseUrl%2B%27/bookmarklet/read.js%27%29%3Bdocument.documentElement.appendChild%28s%29%3B%7D%29%28%29)
复制代码 自动翻页:- 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);}})();
复制代码 如意淘:- javascript:(function(){var d=document,s=d.createElement('script'),h=d.getElementsByTagName('head')[0],t=new Date();s.src='http://ruyi.taobao.com/extension/bookmarklet.js?t='+t.getFullYear()+t.getMonth()+t.getDate();s.charset='utf-8';if(h){h.appendChild(s);}})();
复制代码 FLVCD视频地址解析:- javascript:location.href%20=%20'http://www.flvcd.com/parse.php?flag=&format=&kw='%20+%20location.href;
复制代码 迅雷离线采集小助手:- javascript:void(function(window){window['LXRC_VER']='1.0';var document = window.document;if(typeof(window.lxrcAnalyser)=='undefined'){var lxrc_script = document.createElement('script');lxrc_script.setAttribute('charset','utf-8');lxrc_script.setAttribute('src','http://lixian.vip.xunlei.com/lxrc/js/load.js?'+new Date().getTime() );document.getElementsByTagName('head').item(0).appendChild(lxrc_script);}else{lxrcAnalyser.getResources('all');}})(window);
复制代码 短网址生成:- 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)
复制代码 将当前网页转到https:- <font color="#5d5d5d" size="3"><span style="line-height: 27.999998092651367px;">javascript:location=location.href.replace(/http:/g,"https:");</span></font>
复制代码 维基百科划词搜索:- javascript:function se(d) {return d.selection ? d.selection.createRange().text : d.getSelection()} s = se(document); for (i=0; i<frames.length && !s; i++) s = se(frames[i].document); if (!s || s=='') s = prompt('Enter%20search%20terms%20for%20Wikipedia',''); open('http://zh.wikipedia.org' + (s ? '/w/index.php?title=Special:Search&search=' + encodeURIComponent(s) : '')).focus();
复制代码 自动回复隐藏贴:- javascript:void((function(){var e=document.createElement('script');e.setAttribute('src',' https://userscripts.org/scripts/source/132930.user.js');document.body.appendChild(e);})())
复制代码 查找相似页面:- <font size="2"><span style="color: rgb(102, 102, 102); line-height: 21.600000381469727px; ">javascript:(function(){ document.location.+escape(document.location.href) })();</span> </font>
复制代码 查找反向链接:- javascript:(function(){ document.location.+escape(document.location.href) })();
复制代码 ⑶.网站开发:
夜间模式:- javascript:var nuStyle=document.createElement('link');nuStyle.rel='stylesheet';nuStyle.rev='stylesheet';nuStyle.href='data:text/css,*{background:#333333 !important;color:#cccccc !important;} :link{color:#cccccc !important;} :visited{color:#888888 !important;}';void(document.documentElement.childNodes[0].appendChild(nuStyle));
复制代码 sprymedia测量网页:- javascript:function%20fnStartDesign(sUrl)%20{var%20nScript%20=%20document.createElement
- ('script');nScript.setAttribute('language','JavaScript');nScript.setAttribute('src',sUrl);document.body.appendChild(nScript);}fnStartDesign('http://www.sprymedia.co.uk/design/design/media/js/design-loader.js');
复制代码 Mouseover DOM Inspector查看页面元素:- javascript:void(z=document.body.appendChild(document.createElement('script')));void(z.language='javascript');void(z.type='text/javascript');void(z.src='http://slayeroffice.com/tools/modi/modi.js');void(z.id='modi');
复制代码 查看Cookies:- javascript:alert('Cookies%20stored%20by%20this%20host%20or%20domain:%5Cn%5Cn'%20+%20document.cookie.replace(/;%20/g,'%5Cn'));
复制代码 |
|
|
|
评论
直达楼层