1、什么是Bookmarklet?
1.1 、详细安装步骤
小书签一般是通过创建一个新书签并将代码粘贴入新建书签的URL栏而实现的。现代浏览器中也 可把链接形式的小书签直接拖拽到书签栏中,此后小书签就可以像打开普通书签一样正常运作了。
1.2 、怎么使用小书签?
以下示例小书签可以在浏览器窗口中以维基为搜索引擎搜索任何高亮的文字。正常情况下以下的小 书签可以被安装在[3]浏览器书签栏中。选中文字后即可点击这个小书签以执行搜索。- 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.document); if (!s || s=='') s =
prompt('Enter%20search%20terms%20for%20Wikipedia','');
open('http://en.' + (s ?
'/w/index.php?title=Special:Search&search=' + encodeURIComponent(s) :
'')).focus();
复制代码 2 、外部链接
所有Bookmarklets 都来源于网络,本人没有版权,如果不慎侵犯了你的权益请PM。
工具类:
Quix 是一个可扩展的小书签(Bookmarklet),让你可以只通过这一个小书签而在任何浏览器 上实现所有书签及小书签的功能。你所要做的就是记住相应的命令,因此,Quix 可以被看作是 浏览器中的命令行工具!看看这个视频(**功夫必备)来让你快速了解 Quix 的强大功能。
安装:http:///project/quix/
基本命令这些是 Quix 内置的最为基本的命令,但可能也是最为强大的一些命令。
命令 | 简介 | a | Amazon(亚马逊英文) 搜索 | d | Google 定义一个词语 | dict | Google 词典搜索 | e | 通过 Email 发送当前页链接 | f | Flickr 搜索 | fc | 以CC商业使用为条件搜索 Flickr | g | Google 搜索 | gbs | Google 博客搜索 | imdb | IMDB 搜索 | img | Google 图片搜索 | map | Google 地图搜索 | gs | 在 Google 中搜索当前网站 | nf | Netflix 搜索 | php | PHP 函数搜索 | tr | 翻译当前网页 | w | Wikipedia 搜索 | mh | Mahalo 搜索 | read | 增强当前页面可读性 | 社会化服务类命令以下命令多用于一些社会化的网站及服务。
命令 | 简介 | db | 将当前页加入美味书签(Delicious) | fb | 在 Facebook 分享当前页 | gb | 将当前页加入 Google 书签 | tn | 在 Twitter 上发表当前页(标题) | s | Twitter 搜索 | t | 转到 Twitter 上的相应用户的页面 | v | Vimeo 搜索 | yt | Youtube 搜索 | tumblr | 分享至 Tumblr | post | 分享至 Posterous | su | 提交至 StumbleUpon | WordPressQuix 的作者 Yoast 同时也是一位 WordPress 的狂热爱好者,因此一些 WordPress 相关的命令肯定是必不可少的了。
命令 | 简介 | codex | 搜索 WordPress codex | plugin | 搜索 WordPress 插件 | wp | WordPress 函数搜索 | wpmu | WordPress MU 函数搜索 | wpseek | 通过 wpseek.com 搜索 WordPress 函数 | SEO(搜索引擎优化)作为 SEO ,对于一个网站肯定有很多要检查的东西,Quix 旨 在于将这些东西打包成一组易于记忆的命令。
命令 | 简介 | archive | 在 archive.org 搜索当前页面 | can | 查看当前域名的主页是否指向正确 | dmoz | 在 DMOZ 搜索当前域名 | gbd | 在 Google 博客搜索指向当前域名的链接 | gbu | 在 Google 博客搜索指向当前URL的链接 | gc | 当前网页在 Google 的快照(Cache) | gi | 在 Google Insight 搜索关键词 | gwt | 当前域名的 Google Webmaster Tools (Google 网站管理工具) | h | 当前网页的 Header 信息 | kd | Keyword Density 查询(关键词密度查询)及更多 | linkcheck | 查询当前 URL 所含的链接状态 | maj | 用 Majestic SEO 检查当前域名的热门页面及反向链接 | nofollow | 高亮显示页面中所有包含 nofollow 属性的链接 | seo | 针对当前页面进行一个快速的 seo 检查 | seothis | 弹出所有的 seo 查询结果 | yd | 在 Yahoo 搜索当前域名的反向链接 | yl | 在 Yahoo 搜索当前页面的反向链接 | ydir | 在Yahoo! directory(Yahoo! 网站目录)搜索当前域名 | kwte | 转到 AdWords 关键字工具 | 网站管理员同样,网站管理者们也要对自己的网站进行很多的检查,Quix 也对众多的类似服务 进行了精选,并赋予好记的命令。
命令 | 简介 | csstoggle | 开关当前页面的样式表(CSS) | firebug | 读入 Firebug lite | font | 打开字体调试工具 FontFriend | host | 当前域名的主机状态 | myip | 用户当前的 IP 地址及浏览器信息 | p3p | 查询当前页面的P3P 策略 | register | 注册域名(举例:输入“register test123.com”) | resize | 调整浏览器大小(在某些浏览器中只在单窗口情况下起效) | ruler | 显示一个可通过拖曳测量页面中元素大小的尺子 | sg | 调出 SelectorGadget:一个可指向及点击 CSS 元素的选择器 | speed | 对当前 URL 进行 Pingdom 速度测试 | spriteme | 将当前页面的背景图片通过 Spriteme 转为 Sprite 格式 | vs | 查看当前 URL 的源代码 | w3c | 用 W3C 标准检查当前页面 | w3css | 检查当前页面 CSS 的标准 | whois | 当前域名的 Whois 信息 | xray | 用 XRAY 检查当前页面 | Quix此组命令是为了更于方便地使用 Quix,并加入了 debug 除错功能。
命令 | 简介 | debug | 对 Quix 进行纠错 | help | 帮助页面 | quix | 到达相应的 Quix 页面 | yoast | 搜索 Yoast (Quix作者的网站) | Analytics(分析)一些简单的用于探测网站中 Google Analytics 代码安装情况的脚本。
命令 | 简介 | da | 探测当前页面的 Analytics 代码 | ga | 分析当前页面 Google Analytics 的设置 | gaexport | 让 Google Analytics 的报告中显示更多的行数 (脚本原作者:Arjan Snaterse) | 短URL服务一些用于缩短链接的服务。
命令 | 简介 | trim | 用 Tr.im 缩短当前 URL | bitly | 用 缩短当前 URL | awesm | 用 缩短当前 URL | 应用程序整合类命令与一些全平台的应用程序相整合的命令。
Mac 系统整合类命令很多 Mac 系统的程序员会允许浏览器以类似 tweetie: 的URL来打开相应 的程序,此类的命令就是利用了这一点。
工具类:
aardvark
类似于Mouseover DOM Inspector,但这个Bookmarklet在一定程度上可以取代Mouseover
DOM Inspector、 树形源代码、Dragonfly、Remove It
Permanently。不足之处就是不支持代码折叠,如果能加入列出各元素 的xpath、css路径就无敌了。切盼高手完善(Xpath路径已解决)。- javascript:document.getElementsByTagName('head')%5B0%5D.appendChild(document.createElement('script')).setAttribute('src','http://www./aardvark/bookmarklet.js')
复制代码 AutoPagerize IDE
oAutoPagerize翻页代码生成工具,不足之处还需手动修饰部分代码- javascript:void(%20!(new%20function(){var%20d%20=%20document;var%20s=d.createElement('script');%20s.src=%22http:///clip/m11844/1263397849-apride-36kb.js%22;%20d.body.appendChild(s);%20}%20)%20)
复制代码 Draggable screen ruler顾名思义可拖动的屏幕尺子- javascript:void('http:///tools/favelets/');marqueeColor=prompt('Marquee%20Color:','red');initMarquee=document.createElement('div');marquee=document.body.appendChild(initMarquee);marquee.style.position='absolute';marquee.style.border='dashed%201px%20red';initControls=document.createElement('div');controls=document.body.appendChild(initControls);controls.style.position='absolute';controls.style.top='-300px';controls.style.left='-300px';controls.style.width='85px';controls.style.background='%23eee';controls.style.padding='5px';controls.style.border='solid%201px%20%23ccc';controls.style.font='10px%20verdana,sans-serif';controls.style.width='85px';controls.style.zIndex='99';controls.innerHTML='%3Cb%3ECurrent:%3C/b%3E%3Cbr%3E%20x:%3Cspan%20id=%22currentX%22%3E0%3C/span%3E%20y:%3Cspan%20id=%22currentY%22%3E0%3C/span%3E%3Cbr%3E%3Cb%3EBegin:%3C/b%3E%3Cbr%3E%20x:%3Cspan%20id=%22beginX%22%3E0%3C/span%3E%20y:%3Cspan%20id=%22beginY%22%3E0%3C/span%3E%3Cbr%3E%3Cb%3EEnd:%3C/b%3E%3Cbr%3E%20x:%3Cspan%20id=%22endX%22%3E0%3C/span%3E%20y:%3Cspan%20id%20=%22endY%22%3E0%3C/span%3E%3Cbr%3E%3Cb%3EDimensions:%3C/b%3E%3Cbr%3E%20w:%3Cspan%20id=%22dimX%22%3E0%3C/span%3E%20h:%3Cspan%20id=%22dimY%22%3E0%3C/span%3E';document.onmousemove=follow;document.onmousedown=beginDrag;document.onmouseup=endDrag;currentX=document.getElementById('currentX');currentY=document.getElementById('currentY');beginX=document.getElementById('beginX');beginY=document.getElementById('beginY');endX=document.getElementById('endX');endY=document.getElementById('endY');dimX=document.getElementById('dimX');dimY=document.getElementById('dimY');var%20marqueeLeft=0;var%20marqueeTop=0;dragging=false;void(document.body.style.cursor='crosshair');function%20follow(e){x=e.pageX;y=e.pageY;controls.style.left=x+15+'px';controls.style.top=y+15+'px';currentX.innerHTML=x;currentY.innerHTML=y;if(dragging){marquee.style.width=x-dragstartX+'px';dimX.innerHTML=Math.abs(x-dragstartX);marquee.style.height=y-dragstartY+'px';dimY.innerHTML=Math.abs(y-dragstartY);}return%20true;};function%20beginDrag(e){marquee.style.width=0;marquee.style.height=0;marquee.style.borderColor=marqueeColor;dragging=true;x=e.pageX;y=e.pageY;marquee.style.visibility='visible';marquee.style.left=x+'px';marquee.style.top=y+'px';dragstartX=x;dragstartY=y;beginX.innerHTML=x;beginY.innerHTML=y;return%20true;}function%20endDrag(e){dragging=false;x=e.pageX;y=e.pageY;endX.innerHTML=x;endY.innerHTML=y;return%20true;}
复制代码 云输入法
QQ云输入法(opera浏览器用)- javascript:void((function(){var%20n=navigator.userAgent.toLowerCase();ie=n.indexOf('msie')!=-1?1:0;if(document.documentMode)ie=0;charset='';if(ie)charset=document.charset;src=ie&&charset=='utf-8'?'http://web.pinyin.sogou.com/web_ime/init2_utf8.php':'http://web.pinyin.sogou.com/web_ime/init2.php';element=document.createElement('script');element.setAttribute('src',src);document.body.appendChild(element);})())
复制代码 搜狗云输入法- javascript:void((function(){var%20e=document.createElement('script');e.setAttribute('src','http://web.pinyin.sogou.com/web_ime/init.js');document.body.appendChild(e);})())
复制代码 查看浏览器UA- javascript:var%20x=navigator.userAgent;%20var%20y='%';%20for%20(var%20i=0;i<x.length;i++)%7B%20y+=x.charCodeAt(i).toString(16)+'%';%20%7D%20y=unescape(decodeURI(y.replace(/\%$/,'')));%20alert(x+'\n'+y);%20void(0);
复制代码 汉典在线查字- javascript:void((function()%20{var%20element=document.createElement('script');%20element.setAttribute('src',%20'http://www.zdic.net/tools/zih.asp');%20document.body.appendChild(element);})())
复制代码 短网址
sidebar
[url=]- javascript:var%20e=document.createElement('script');e.setAttribute('language','javascript');e.setAttribute('src','http:///bookmarklet/load.js');document.body.appendChild(e);void(0);
复制代码 [/url]
sidebar
- javascript:var%20e=document.createElement('script');e.setAttribute('language','javascript');e.setAttribute('src','http:///bookmarklet/load.js');document.body.appendChild(e);void(0);
复制代码 Print Friendly- javascript:(function(){pfstyle='bk';_pnicer_script=document.createElement('SCRIPT');_pnicer_script.type='text/javascript';_pnicer_script.src='http://cdn./printfriendly.js?x='+(Math.random());document.getElementsByTagName('head')[0].appendChild(_pnicer_script);_pnicer_css=document.createElement('LINK');_pnicer_css.rel='stylesheet';_pnicer_css.href='http://cdn./printfriendly.css';_pnicer_css.type='text/css';_pnicer_css.media='screen';document.getElementsByTagName('head')
- [0].appendChild(_pnicer_css);})();
复制代码 Clip to EverNote- javascript:(function(){EN_CLIP_HOST='http://www.';try{var%20x=document.createElement('SCRIPT');x.type='text/javascript';x.src=EN_CLIP_HOST+'/public/bookmarkClipper.js?'+(new%20Date().getTime()/100000);document.getElementsByTagName('head')[0].appendChild(x);}catch(e){location.href=EN_CLIP_HOST+'/clip.action?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);}})();
复制代码 Google Maker- javascript:(function(){var%20a=window,b=document,c=encodeURIComponent,d=a.open('http://www.google.com/cse/manage/bookmarklet?url='+c(b.location)%20+%20'','coop_popup','left='+((a.screenX||a.screenLeft)+10)+',top='+((a.screenY||a.screenTop)+10)+',height=420px,width=700px,resizable=1,alwaysRaised=1,scrollbars=1');a.setTimeout(function(){d.focus()},300)})();
复制代码 TinyURL! 快速縮短網址- javascript:void(location.href='http:///create.php?url='+encodeURIComponent(location.href))
复制代码 繁体转简体
来源:21楼[url=space.php?uid=68875]sungt[/url]- javascript:(function(){var%20s=document.getElementById("tongwenlet_cn");if(s!=null){document.body.removeChild(s);}var%20s=document.createElement("script");s.language="javascript";s.type="text/javascript";s.src="http://tongwen./NewTongWen/tools/bookmarklet_cn.js";s.id="tongwenlet_cn";document.body.appendChild(s);%20})();
复制代码 查找反向链接
查看都有哪些页面链接到了当前页,对于网站站长来说,这是个相当实用的功能。- javascript:(function(){%20document.location.href='http://www.google.com/search?q=link:'+escape(document.location.href)%20})();
复制代码 Share on Posterous
透過Posterous的書籤小工具,我們可以很方便的引用、轉貼網路上的內容,然後加上自己的 意見,這樣一篇網誌就立刻誕生了。- javascript:var%20b=document.body;var%20POSTEROUS___bookmarklet_domain='http://';if(b&&!document.xmlVersion){void(z=document.createElement('script'));void(z.type='text/javascript');void(z.src='http:///javascripts/bookmarklet2.js');void(b.appendChild(z));}else{}
复制代码
Search Bookmarklet
反查某網址的Twitter轉貼分享- javascript:location.href='http:///search?q='+encodeURIComponent(location.href)
复制代码 向上一层- javascript:if
(location.pathname == '/'); else if
(location.pathname.charAt(location.pathname.length-1) == '/') location =
'..'; else location = '.'; void 0
复制代码 夜间模式
把页面背景改为黑色,文字改为白色,夜间可保护眼睛~- javascript:var
nuStyle=document.createElement('link');nuStyle.rel='stylesheet';nuStyle.rev='stylesheet';nuStyle.href='data:text/css,*{background:#222222
!important;color:#ffffff !important;} :link{color:#ffffff !important;}
:visited{color:#888888
!important;}';void(document.documentElement.childNodes[0].appendChild(nuStyle));
复制代码 破解限制
可以破解右键限制和复制限制,- 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)
复制代码 合并(书签)用,合并用,简省空间。最少三个
来源:[url=space.php?uid=74995]VIN[/url]
http:///bookmarklet-combiner/
PrintWhatYouLike
有時候我們可能需要把網頁列印出來或轉成PDF檔案,這時候PrintWhatYouLoike提供了很好的版面重新 編排功能,以及幫你將重組後的網頁直接輸出列印、轉檔PDF。
這個書籤小工具點擊後,會在左方浮現一個排版工具列,你可以點擊網頁中任何元素、文字段落, 進行刪除或保留。- javascript:(function(){if(window['ppw']&&ppw['bookmarklet']){ppw.bookmarklet.toggle();}else{window._pwyl_home='http://www./';window._pwyl_pro_id=null;window._pwyl_bmkl=document.createElement('script');window._pwyl_bmkl.setAttribute('type','text/javascript');window._pwyl_bmkl.setAttribute('src',window._pwyl_home+'static/compressed/pwyl_bookmarklet_10.js');window._pwyl_bmkl.setAttribute('pwyl','true');document.getElementsByTagName('head')[0].appendChild(window._pwyl_bmkl);}})();
复制代码
gfwList Report V2.1
您浏览任何网站时,点一下这个书签就可以报告被墙的网站。 技巧 (仅对 Firefox 有效):将该链接 拖放好之后,右键单击之,选择“属性”,在“关键词”一栏里随便填一或多个字母(如"g")。以后,您报 告被墙网站时,甚至不需要找/点这个书签,只需:
- Ctrl + L(字母 L, 无需同时按 Shift 键)
- g(就是刚刚在“关键词”那一栏里填的字母)
- 回车
- javascript:(function(){L='https:///gfwlist/report/?url='+window.location.href;(function(){if(!window.open(L,'gfwListReport',''))location.href=L})();})()
复制代码
页面类:
阅读助手
推荐三个简单的书签工具,分别是Readability、Clippable和Readable,其功能皆是让你快速获取网页中 的「主
文内容」,去除掉所有多余的边栏工具、广告物件,并且帮你重新调整文字版面样式,强化内容 的易读性,帮助你可以好好静下心来在电脑萤幕前、在网路上读完一
篇你想读的电子文章。
Readability(舟:较好)- javascript:(function(){readStyle='style-newspaper';readSize='size-large';readMargin='margin-wide';_readability_script=document.createElement('SCRIPT');_readability_script.type='text/javascript';_readability_script.src='http://lab./experiments/readability/js/readability.js?x='+(Math.random());document.getElementsByTagName('head')%5B0%5D.appendChild(_readability_script);_readability_css=document.createElement('LINK');_readability_css.rel='stylesheet';_readability_css.href='http://lab./experiments/readability/css/readability.css';_readability_css.type='text/css';_readability_css.media='screen';document.getElementsByTagName('head')%5B0%5D.appendChild(_readability_css);_readability_print_css=document.createElement('LINK');_readability_print_css.rel='stylesheet';_readability_print_css.href='http://lab./experiments/readability/css/readability-print.css';_readability_print_css.media='print';_readability_print_css.type='text/css';document.getElementsByTagName('head')%5B0%5D.appendChild(_readability_print_css);})();
复制代码 Clippable(舟:丢失内容)- javascript:(function(){x=document.createElement('SCRIPT');x.type='text/javascript';x.src='http:///share/readability.js?x='+(Math.random());document.getElementsByTagName('head')%5B0%5D.appendChild(x);y=document.createElement('LINK');y.rel='stylesheet';y.href='http:///share/readability.css?x='+(Math.random());y.type='text/css';y.media='screen';document.getElementsByTagName('head')%5B0%5D.appendChild(y);})();
复制代码 Readable(舟:丢失内容)- javascript:(function(){if(document.getElementsByTagName('html').length>0);else%7Breturn;%7Dif(document.getElementsByTagName('body').length>0);else%7Breturn;%7Dif(window.$readable);else%7Bwindow.$readable=%7B%7D;window.$readable.path='http://readable-app./';%7Dwindow.$readable.options=%7B%7D;window.$readable.options.base='blueprint';window.$readable.options.font_family='wide_sans_serif';window.$readable.options.font_size='16';window.$readable.options.text_line_height='1_5';window.$readable.options.text_align='normal';window.$readable.options.text_image_align='center';window.$readable.options.text_box_width='35_em';window.$readable.options.text_box_align='center';window.$readable.options.text_box_outer_margin='1';window.$readable.options.text_box_inner_margin='1_5';window.$readable.options.color_theme='light_grey_off_black';window.$readable.options.background_transparency='90';window.$readable.options.background_transparency_color='from_theme';window.$readable.options.video='strip';if(window.$readable.callScript)%7Bwindow.$readable.callScript();return;%7Dif(document.getElementsByTagName('head').length>0);else%7Bdocument.getElementsByTagName('html')%5B0%5D.insertBefore(document.createElement('head'),document.getElementsByTagName('body')%5B0%5D);%7Ddocument.getElementsByTagName('head')%5B0%5D.appendChild(document.createElement('script')).setAttribute('src',window.$readable.path+'target.js?rand='+encodeURIComponent(Math.random()));})()
复制代码 当前页面ip查询- javascript:document.body.innerHTML%20+=%20'<div%20style=%22background-color:#e0e0e0;%20border:3px%20outset%20black\;width:504px\;position:fixed\;Z-index:999\;%20top:20px\;%20right:20px\;%22%20onDblClick=%22this.style.display=\'none\'\;%22><center>\u5f53\u524d\u9875\u9762\u0049\u0050\u67e5\u8be2\u3000\u002d\u3000\u53cc\u51fb\u6b64\u5904\u5173\u95ed\u6b64\u7a97\u53e3<\/center><iframe%20width=%22500%22%20height=%2240%22%20src=%22http:\/\/www.ip.cn\/getip.php?action=queryip&ip_url='+location.host+'%22><\/iframe><\/div>';%20void(0);
复制代码 Split window vertically(垂直分屏浏览)- javascript:document.write('%3CHTML%3E%3CHEAD%3E%3C/HEAD%3E%3CFRAMESET%20COLS=\'50%25,*\'%3E%3CFRAME%20SRC='%20+%20location.href%20+%20'%3E%3CFRAME%20SRC='%20+%20location.href%20+%20'%3E%3C/FRAMESET%3E%3C/HTML%3E')
复制代码 Split window horizontally(水平分屏浏览)- javascript:document.write('%3CHTML%3E%3CHEAD%3E%3C/HEAD%3E%3CFRAMESET%20ROWS=\'50%25,*\'%3E%3CFRAME%20SRC='%20+%20location.href%20+%20'%3E%3CFRAME%20SRC='%20+%20location.href%20+%20'%3E%3C/FRAMESET%3E%3C/HTML%3E')
复制代码 kwoutkwout可以截取网页中的一部分,生成一个带链接的图片,并生成可以嵌入你网站的代码,还可 直接发送到你的blog(仅限提供的列表),甚至能作为你视频评论以及邮寄电子邮件等
kwout in a new window和kwout everywhere不同之处就是,kwout in a new
window先生成一个整页截图 再让你通过拖拽截取其中的一部分,而kwout
everywhere通过DOM截取网页中的一部分,图片大小不超过600px
kwout in a new window- javascript:(function(){var%20b=document.body,e=document.documentElement,h=100,s=self,y=0,w=window;if(s.pageYOffset)y=s.pageYOffset;else%20if(e%20&&%20e.scrollTop)y=e.scrollTop;else%20if(b)y=b.scrollTop;if(w.innerHeight%20&&%20w.scrollMaxY)h=w.innerHeight+w.scrollMaxY;else%20if(b.scrollHeight%20>%20b.offsetHeight)h=b.scrollHeight;else%20h=b.offsetHeight;w.open('http:///grab?address='+encodeURIComponent(location.href)+'&scroll='+(y/h));})();
复制代码 kwout everywhere- javascript:(function(){var%20d=document;var%20s=d.createElement('scr'+'ipt');s.charset='UTF-8';s.language='javascr'+'ipt';s.src='http:///javascripts/everywhere.en.js?t='+(new%20Date()).getTime();s.type='text/javascr'+'ipt';d.body.appendChild(s);})();
复制代码 查看当前页的Javascript变量与函数- javascript:(function(){var%20x,d,i,v,st;%20x=open();%20d=x.document;%20d.open();%20function%20hE(s){s=s.replace(/&/g,%22&%22);s=s.replace(/>/g,%22>%22);s=s.replace(/</g,%22<%22);return%20s;}%20d.write(%22<style>td{vertical-align:top;%20white-space:pre;%20}%20table,td,th%20{%20border:%201px%20solid%20#ccc;%20}%20div.er%20{%20color:red%20}</style><table%20border=1><thead><tr><th>Variable</th><th>Type</th><th>Value%20as%20string</th></tr></thead>%22);%20for%20(i%20in%20window)%20{%20if%20(!(i%20in%20x)%20)%20{%20v=window%5Bi%5D;%20d.write(%22<tr><td>%22%20+%20hE(i)%20+%20%22</td><td>%22%20+%20hE(typeof(window%5Bi%5D))%20+%20%22</td><td>%22);%20if%20(v===null)%20d.write(%22null%22);%20else%20if%20(v===undefined)%20d.write(%22undefined%22);%20else%20try{st=v.toString();%20if%20(st.length)d.write(hE(v.toString()));%20else%20d.write(%22%20%22)}catch(er){d.write(%22<div%20class=er>%22+hE(er.toString())+%22</div>%22)};%20d.write(%22</pre></td></tr>%22);%20}%20}%20d.write(%22</table>%22);%20d.close();%20})();
复制代码 Show ID's and Classes标出所有DIV的ID和Classes- javascript:(function(){var%20newSS;%20newSS=document.createElement('link');newSS.rel='stylesheet';%20newSS.type='text/css';newSS.href='http://www./stuff/css-debug.css';%20document.documentElement.childNodes%5B0%5D.appendChild(newSS);})();
复制代码 Mouseover DOM Inspector v2.0
它提供了一种十分方便的查看网页DOM结构的方法。该查看器被实现为一个收藏夹项(或书签项), 只需简单地在文档上移动鼠标就可以查看并修改网页的DOM。 开发人员可以通过访问www./tools/modi/v2.0 /modi_help.html安装该查看器。 Mouseover DOM Inspector支持Firefox、Mozilla、Netscape 8、Opera 7.5或更高版本,以及Internet Explorer 6或更高版本。- javascript:void(z=document.body.appendChild(document.createElement('script')));void(z.language='javascript');void(z.type='text/javascript');void(z.src='http:///tools/modi/v2.0/modi_v2.0.js');void(z.id='modi');
复制代码 DOM
随鼠标显示DOM信息- javascript:void(z=document.body.appendChild(document.createElement('script')));void(z.language='javascript');void(z.type='text/javascript');void(z.src='http:///tools/modi/modi.js');void(z.id='modi');
复制代码 Element Ancestry
点击任何地方都弹出此元素的DOM路径- javascript:%20void(d=document);void(js='http:///misc/js/bookmarklet_whichElement.js');void(d.g=d.getElementsByTagName);void(l='script');void(H=d.g('head').item(0));void(c=(d.all)?c=d.all.tags(l):d.g(l));with(c)%20{for(i=0;i<length;i++){if(item(i).getAttribute('src')==js)location.reload();}}void(L=d.createElement(l));void(L.s=L.setAttribute);void(L.s('language','javascript'));void(L.s('src',js));void(H.appendChild(L));
复制代码 Word Frequency
列出所有words,并统计出现次数。- javascript:(function(){var%20T=%7B%7D,W=%5B%5D,C=0,s,i;%20function%20F(n)%7Bvar%20i,x,a,w,t=n.tagName;if(n.nodeType==3)%7Ba=n.data.toLowerCase().split(/%5B\s\(\)\:\,\.;\<\>\&\'\%22%5D/),i;for(i%20in%20a)if(w=a%5Bi%5D)%7Bw=%22%20%22+w;T%5Bw%5D=T%5Bw%5D?T%5Bw%5D+1:1;++C;%7D%7Dif(t!=%22SCRIPT%22&&t!=%22STYLE%22)for(i=0;x=n.childNodes%5Bi%5D;++i)F(x)%7DF(document);for(i%20in%20T)W.push(%5BT%5Bi%5D,i%5D);W.sort(function(a,b)%7Bvar%20x=b%5B0%5D-a%5B0%5D;return%20x?x:((b%5B1%5D<a%5B1%5D)?1:-1)%7D);%20s=%22<h3>%22+C+%22%20words</h3>%22;for(i%20in%20W)s+=W%5Bi%5D%5B0%5D+%22:%22+W%5Bi%5D%5B1%5D+%22<br>%22;with(open().document)%7Bwrite(s);close()%7D})()
复制代码 Design
Design 一个综合性工具,主要包含四个功能选项
Grid: 在网页上显示网格配置
Rule: 在网页上显示标尺
Unit: 测量不同两点之间的距离
Crosshair: 显示一个十字光标标记出当前位置的坐标值
http://www./article/Design- 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./design/design/media/js/design-loader.js');
复制代码 滚动屏幕(Esc停止滚动,修改window.scrollBy ( 0,1 )中的1为1~10任意正数还能调整滚动速度)- javascript:function%20AutoScroll()%20{window.scrollBy(0,1);%20NextScroll%20=%20setTimeout('AutoScroll()',%20120);window.onkeydown%20=%20StopScroll;};function%20StopScroll(e)%20{if(e.keyCode%20==%2027){clearTimeout(NextScroll);};};AutoScroll();
复制代码 Google Reader
資訊接收管理中心- javascript:var%20b=document.body;var%20GR________bookmarklet_domain='http://www.google.com';if(b&&!document.xmlVersion){void(z=document.createElement('script'));void(z.src='http://www.google.com/reader/ui/link-bookmarklet.js');void(b.appendChild(z));}else{}
复制代码 Instapaper
稍后阅读。只要点击后立刻将网页内文储存到你的稍后阅读清单中,没有任何多余的操作步骤。
- javascript:function%20iprl5(){var%20d=document,z=d.createElement('scr'+'ipt'),b=d.body,l=d.location;try{if(!b)throw(0);d.title='(Saving...)%20'+d.title;z.setAttribute('src',l.protocol+'//www.instapaper.com/j/H88Ks3SLLP21?u='+encodeURIComponent(l.href)+'&t='+(new%20Date().getTime()));b.appendChild(z);}catch(e){alert('Please%20wait%20until%20the%20page%20has%20loaded.');}}iprl5();void(0)
复制代码 Subscribe
用Google Reader订阅网络最新好文章- javascript:var%20b=document.body;var%20GR________bookmarklet_domain='http://www.google.com';if(b&&!document.xmlVersion){void(z=document.createElement('script'));void(z.src='http://www.google.com/reader/ui/subscribe-bookmarklet.js');void(b.appendChild(z));}else{location='http://www.google.com/reader/view/feed/'+encodeURIComponent(location.href)}
复制代码 搜索反向链接的页面
通过这个 Bookmarket,你可以搜索所有链接到当前页面的网页。- javascript:(function(){%20p=prompt('Search%20term:','');%20if(p){%20document.location.href='http://www.google.com/cse?url='%20+%20escape(document.location.href)%20+%20'&cref=http%3A%2F%2Fwww.google.com%2Fcse%2Ftools%2Fmakecse%3Furl%3D'%20+%20escape(document.location.href)%20+%20'&q='+escape(p)}%20})();
复制代码 显示网页快照
看看当前页的网页快照是什么样子的,对于挨 Digg 的网站还是比较实用的。- javascript:(function(){%20document.location.href='http://www.google.com/search?q=cache:'+escape(document.location.href)%20})();
复制代码 查找相似页面
查找所有和当前页相关的网页,其实就是 related: 命令。- javascript:(function(){%20document.location.href='http://www.google.com/search?q=related:'+escape(document.location.href)%20})();
复制代码 PageRank
快速查看当前页面的 PageRank,当然对于 Firefox 用户我更推荐 Search Status 插件,而 IE7 用户 使用 IE7Pro 就可以实现了。- javascript:(function(){%20var%20pg_popup%20=%20window.open('','window','width=150,height=80');%20pg_popup.document.write('<center><a%20href=\'http://www./\'%20target=\'_blank\'><img%20src=\'http://www./'+document.location.href.split('/')[2]+'-pagerank-1.gif\'%20alt=\'Checking%20Page%20Ranking\'%20border=\'0\'%20/></a><br/><br/><a%20href=\'javascript:window.close()\'>Close</a></center>');%20})();
复制代码 用 Gmail 发送当前页面
可以将当前页面快速放入 Gmail 的撰写对话框中,方便与朋友分享或是自己保存。- javascript:(function(){%20document.location.href='http://mail.google.com/mail/?view=cm&fs=1&su='+escape(document.title)+'%20(link)&body='+escape(document.location.href)%20})();
复制代码 提交到 Google
将当前页面提交到 Google 搜索。最没用的功能,要提交站长肯定是第一个提交的,呵呵。- javascript:(function(){%20document.location.href='http://www.google.com/addurl?q='+escape(document.location.href)%20})();
复制代码 Readable
讓網頁主文更加易讀- javascript:(function(){if(document.getElementsByTagName('html').length>0);else{return;}if(document.getElementsByTagName('body').length>0);else{return;}if(window.$readable);else{window.$readable={};window.$readable.path='http://readable-app./';}window.$readable.options={};window.$readable.options.base='better_readability';window.$readable.options.font_family='lucida';window.$readable.options.font_size='16';window.$readable.options.text_line_height='1_625';window.$readable.options.text_align='normal';window.$readable.options.text_image_align='center';window.$readable.options.text_box_width='30_em';window.$readable.options.text_box_align='center';window.$readable.options.text_box_outer_margin='1';window.$readable.options.text_box_inner_margin='2';window.$readable.options.color_theme='off_yellow_off_black';window.$readable.options.background_transparency='90';window.$readable.options.background_transparency_color='from_theme';window.$readable.options.video='strip';if(window.$readable.callScript){window.$readable.callScript();return;}if(document.getElementsByTagName('head').length>0);else{document.getElementsByTagName('html')[0].insertBefore(document.createElement('head'),document.getElementsByTagName('body')[0]);}document.getElementsByTagName('head')[0].appendChild(document.createElement('script')).setAttribute('src',window.$readable.path+'target.js?rand='+encodeURIComponent(Math.random()));})()
复制代码 自动刷新
会调用一个叫"刷刷"的网站实现自动刷新- javascript:location.href = 'http://www./?url=' + location.href;
复制代码 列出页面内图片,图片地址,尺寸- javascript:var%20imgWin,i,outText='',di=document.images;for(i=0;i<0){outtext+=''+di.height+''+di.width+''+di.src+'';}}if(outText==''){alert('No%20Images!');}else{imgWin=window.open('','IW','width=800,height=600,scrollbars=yes');void(imgWin.document.body.innerHTML='ImageHeightWidthURL'+outText+'');}<0){outtext+='
复制代码 SharedCopy
SharedCopy是一個很特別的分享工具,一般我們轉貼網頁給別人看時,就只能單純轉貼文章原始內容, 但是透過SharedCopy,可以讓我們在網頁上加註解、畫重點,並且將這些編輯後的新網頁轉貼給他人看。
啟動SharedCopy的Bookmarklet後,會在右上方出現一個編輯工具列,當我們編輯完成後按下 〔Save〕,就可以獲得專屬轉貼連結。- javascript:(function(){%20u="http://";c=document;b=c.body;d=b.appendChild(c.createElement('div'));d.id="k_deleteme";d.innerHTML="<h1%20style='position:absolute;top:"+((b.scrollTop||c.documentElement.scrollTop)+10)+"px;background-color:#eee'><img%20src='"+u+"/images/loading.gif?V0'%20/>LOADING..</h1>";s=c.createElement('script');s.id='k_script';s.src=u+'/javascripts/k.js?v=1'+%20('%s'==('%'+'s')?'':'&t=%s')+'&r='+Math.random();b.appendChild(s);})();;%20void(0);
复制代码 摧毁网站
地址栏输入- javascript:var%20s%20=%20document.createElement('script');s.type='text/javascript';document.body.appendChild(s);s.src='http://erkie.github.com/asteroids.min.js';void(0);
复制代码 再回车,使用方向键控制方向,空格键发射子弹,可摧毁网页上任何目标。
TinEye Images
Tineye是一个用图片搜索图片的技术,你可以看这里了解它的原理和体验它的神奇。- javascript:void(window.open('http:///search?pluginver=bookmark_1.0&url='%20+%20encodeURIComponent(document.URL)));
复制代码 |
|
搜索类:
Bookmarklet Search
感谢[url=space.php?uid=87790]leungxh[/url]- javascript:(function(){if(document.getElementById('bmletMain')){bmletRefresh();return;};var%20d=document;s=d.createElement('script');s.setAttribute('src','http://www./bookmarklets/Marklet/marklet.js');s.setAttribute('type','text/javascript');d.body.appendChild(s);})();
复制代码 google站内搜索(新建标签页打开)- javascript:q%20=%20%22%22%20+%20(window.getSelection%20?%20window.getSelection()%20:%20document.getSelection%20?%20document.getSelection()%20:%20document.selection.createRange().text);%20if%20(!q)%20q%20=%20prompt(%22%E8%AF%B7%E8%BE%93%E5%85%A5%E5%85%B3%E9%94%AE%E8%AF%8D:%22,%20%22%22);%20if%20(q!=null)%20{var%20qlocation=%22%20%22;qlocation=('http://www.google.com/search?num=100&hl=zh-CN&newwindow=1&q='+q+'&sitesearch='+location.host+'');window.open(qlocation);}%20void%200
复制代码 百度站内搜索- javascript:var%20Bar=location.host+"";q%20=%20%22%22%20+%20(window.getSelection%20?%20window.getSelection()%20:%20document.getSelection%20?%20document.getSelection()%20:%20document.selection.createRange().text);%20if%20(!q)%20q%20=%20prompt(%22\u8BF7\u8F93\u5165\u641C\u7D22\u7684\u5173\u952E\u8BCD:%22,%20%22%22);%20if%20(q!=null)%20{var%20qlocation=%22%20%22;qlocation=('http://www.baidu.com/s?&ie=UTF-8&oe=UTF-8&cl=3&rn=100&wd=%20%20'+q+'%20%20%20site:%20'+Bar+'');window.open(qlocation);}%20void%200
复制代码 |
|
翻译类:
划词翻译
尚译,划词翻译(DemoJameson提供)- javascript:void((function(){if(window.Como&&window.Como.someyi){Como.someyi.init()}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./'+c);document.getElementsByTagName('head').item(0).appendChild(a);Text.prototype.tagName='#text'}})())
复制代码 Dict.CN 划词助手- javascript:void((function()%20{var%20element=document.createElement('script');%20element.setAttribute('src',%20'http://dict.cn/hc/init.php');%20document.body.appendChild(element);})())
复制代码 小D划词- javascript:void((function(){hjelm=document.createElement('script');hjelm.setAttribute('src','http://dict.hjenglish.com/js/dict.js');document.body.appendChild(hjelm);})())
复制代码 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');};})();
复制代码 |
|
|
|
图片类:
List Large Images
列出全部大于500×500的图片,感谢伪娘- javascript:var
x=document.images;var s='';for (var
i=0;i<x.length;i++){if(x%5Bi%5D.width>=500&&x%5Bi%5D.height>=500)s
= s+'<img
src=\"'+x%5Bi%5D.src+'\"><\/img><br><br>'};document.body.innerHTML=s;void(0);
复制代码 Show Images + Pixel Size
列出全部图片,并在图片右侧显示图片尺寸- javascript:n='';for(i=0;i%3Cdocument.images.length;i++)%7Bn+='%3Cimg%20src='+document.images%5Bi%5D.src+'%3E%20'+document.images%5Bi%5D.width+'x'+document.images%5Bi%5D.height+'%3Cbr%3E%3Cbr%3E'%7D;if(n!='')%7Bdocument.write('%3Cp%20style=font-size:11px;font-family:verdana,sans;%3E'+n+'%3C/p%3E');void(document.close())%7Delse%7Balert('i%20see%20no%20images')%7D
复制代码 List Images
以表格形式列出本页所有图片,依次显示 Image Height Width URL- javascript:outText='';for(i=0;i<document.images.length;i++){if(outText.indexOf(document.images%5Bi%5D.src)==-1){outText+='<tr><td><img%20src='+document.images%5Bi%5D.src+'></td><td>'+document.images%5Bi%5D.height+'</td><td>'+document.images%5Bi%5D.width+'</td><td>'+document.images%5Bi%5D.src+'</td></tr>'}};if(outText!=''){imgWindow=window.open('','imgWin','width=800,height=600');imgWindow.document.write%20('<table%20border=1%20cellpadding=10><tr><th>Image</th><th>Height</th><th>Width</th><th>URL</th></tr>'+outText+'</table>');imgWindow.document.close()}else{alert('No%20images!')}
复制代码 View Background Image
使背景图片变得可以链接- javascript:var
backup=document.body.onclick;void(document.body.onclick=function(event){var
bodyStyle=window.getComputedStyle(document.body,null).getPropertyValue('background-image');var
bgStyle=window.getComputedStyle(event.target,null).getPropertyValue('background-image');if(bgStyle!='none')window.open(bgStyle.replace(/url\("?/,'').replace(/"?\)$/,''));else
if(bodyStyle!='none')window.open(bodyStyle.replace(/url\("?/,'').replace(/"?\)$/,''));document.body.onclick=backup;backup=undefined;});
复制代码 ListJPG
仅列出本页jpg图片- javascript:outText='';for(i=0;i<document.images.length;i++){if(outText.indexOf(document.images%5Bi%5D.src)==-1&&(document.images%5Bi%5D.src.lastIndexOf('jpg')!=-1||document.images%5Bi%5D.src.lastIndexOf('jpeg')!=-1||document.images%5Bi%5D.src.lastIndexOf('jpe')!=-1||document.images%5Bi%5D.src.lastIndexOf('jfif')!=-1||document.images%5Bi%5D.src.lastIndexOf('JPG')!=-1||document.images%5Bi%5D.src.lastIndexOf('JPEG')!=-1||document.images%5Bi%5D.src.lastIndexOf('JPG')!=-1||document.images%5Bi%5D.src.lastIndexOf('JFIF')!=-1)){outText+='<tr><td><img%20src='+document.images%5Bi%5D.src+'%20/></td></tr>'}};if(outText!=''){imgWindow=window.open('','imgWin','width=800,height=600');imgWindow.document.write%20('<table%20border=1%20cellpadding=10>'+outText+'</table>');imgWindow.document.close()}else{alert('No%20images!')}
复制代码 仅列出本页gif图片- javascript:outText='';for(i=0;i<document.images.length;i++){if(outText.indexOf(document.images%5Bi%5D.src)==-1&&(document.images%5Bi%5D.src.lastIndexOf('gif')!=-1||document.images%5Bi%5D.src.lastIndexOf('GIF')!=-1)){outText+='<tr><td><img%20src='+document.images%5Bi%5D.src+'%20/></td></tr>'}};if(outText!=''){imgWindow=window.open('','imgWin','width=800,height=600');imgWindow.document.write%20('<table%20border=1%20cellpadding=10>'+outText+'</table>');imgWindow.document.close()}else{alert('No%20images!')}
复制代码 仅列出本页png图片- javascript:outText='';for(i=0;i<document.images.length;i++){if(outText.indexOf(document.images%5Bi%5D.src)==-1&&(document.images%5Bi%5D.src.lastIndexOf('png')!=-1||document.images%5Bi%5D.src.lastIndexOf('PNG')!=-1)){outText+='<tr><td><img%20src='+document.images%5Bi%5D.src+'%20/></td></tr>'}};if(outText!=''){imgWindow=window.open('','imgWin','width=800,height=600');imgWindow.document.write%20('<table%20border=1%20cellpadding=10>'+outText+'</table>');imgWindow.document.close()}else{alert('No%20images!')}
复制代码
仅列出本页bmp图片- javascript:outText='';for(i=0;i<document.images.length;i++){if(outText.indexOf(document.images%5Bi%5D.src)==-1&&(document.images%5Bi%5D.src.lastIndexOf('bmp')!=-1||document.images%5Bi%5D.src.lastIndexOf('dib')!=-1||document.images%5Bi%5D.src.lastIndexOf('BMP')!=-1||document.images%5Bi%5D.src.lastIndexOf('DIB')!=-1)){outText+='<tr><td><img%20src='+document.images%5Bi%5D.src+'%20/></td></tr>'}};if(outText!=''){imgWindow=window.open('','imgWin','width=800,height=600');imgWindow.document.write%20('<table%20border=1%20cellpadding=10>'+outText+'</table>');imgWindow.document.close()}else{alert('No%20images!')}
复制代码
对于大图撑大的页面进行宽度适配
来源:[url=space.php?uid=88798]holo[/url]- javascript:(function(){function%20t(f){a=d.createNodeIterator(d,1,f,false);while(a.nextNode()){}}var%20d=document;t(function(e){x=e.offsetLeft;l=e.offsetParent;while(l!=null){x+=l.offsetLeft;l=l.offsetParent}var%20w=d.documentElement.clientWidth-x;var%20s=e.style;if(s.marginLeft)w-=s.marginLeft;if(s.marginRight)w-=s.marginRight;if(s.paddingLeft)w-=s.paddingLeft;if(s.paddingRight)w-=s.paddingRight;if(s.borderSize)w-=s.borderSize;w-=d.defaultView.innerWidth-d.documentElement.offsetWidth;if(e.tagName=='IMG'){h=e.clientHeight*w/e.clientWidth;s.maxHeight=h}s.maxWidth=w+'px'})})();
复制代码 |
|
媒体类:
Y! player
调用yahoo player在线播放mp3链接
来源- javascript:(function(){var%20start%20=%20function(){YAHOO.mediaplayer.loadPlayerScript()};var%20script%20=%20document.createElement('script');script.src%20=%20'http://mediaplayer.yahoo.com/js';if(script.addEventListener){script.addEventListener('load',%20start,%20false);}%20else{script.onreadystatechange%20=%20function(){if(this.readyState=='complete'){%20start();%20script%20=%20null;}%20}}script.type='text/javascript';document.getElementsByTagName('head')%5B0%5D.appendChild(script);})();
复制代码 直接测试:I Realise
推荐一个重量级的,貌似知道的人不多 http:///,可以收藏这个,现搜现用- javascript:(function(){if(document.getElementById('bmletMain')){bmletRefresh();return;};var%20d=document;s=d.createElement('script');s.setAttribute('src','http://www./bookmarklets/Marklet/marklet.js');s.setAttribute('type','text/javascript');d.body.appendChild(s);})();
复制代码
对于大图撑大的页面进行宽度适配- javascript:(function(){function%20t(f){a=d.createNodeIterator(d,1,f,false);while(a.nextNode()){}}var%20d=document;t(function(e){x=e.offsetLeft;l=e.offsetParent;while(l!=null){x+=l.offsetLeft;l=l.offsetParent}var%20w=d.documentElement.clientWidth-x;var%20s=e.style;if(s.marginLeft)w-=s.marginLeft;if(s.marginRight)w-=s.marginRight;if(s.paddingLeft)w-=s.paddingLeft;if(s.paddingRight)w-=s.paddingRight;if(s.borderSize)w-=s.borderSize;w-=d.defaultView.innerWidth-d.documentElement.offsetWidth;if(e.tagName=='IMG'){h=e.clientHeight*w/e.clientWidth;s.maxHeight=h}s.maxWidth=w+'px'})})();
复制代码 |
|
|
| 合并用,简省空间。
最少三个
http:///bookmarklet-combiner/ |
|
|