作家
登录

10个实用的脚本代码工具

作者: 来源:www.28hudong.com 2013-03-30 01:37:21 阅读 我要评论

下面介绍10个实用的 浏览辅助 Tidy Read 复制代码 代码如下:javascript:(function(){var s=document.createElement("script");s.charset="gb2312";s.language="javascript";s.type="text/javascript";s.src="http://tidyread.com/tidyread.js?u="+encodeURIComponent(document.location.href)+"&t="+encodeURIComponent(document.title);document.body.appendChild(s)})(); 将那些乱糟糟的页面清理干净,更加可以自由设置喜好,很强大。 Show Password 复制代码 代码如下:javascript:(function(){var s,F,j,f,i; s = ""; F = document.forms; for(j=0; j<F.length; ++j) { f = F[j]; for (i=0; i<f.length; ++i) { if (f[i].type.toLowerCase() == "password") s += f[i].value + "n"; } } if (s) alert("Passwords in forms on this page:nn" + s); else alert("There are no passwords in forms on this page.");})(); 查看网页上显示为*****的密码。觉得很有用处,比如当Chrome记住密码,而你忘了时... Dictionary.com 复制代码 代码如下:javascript:(function(){ q=document.getSelection(); if(!q) q=prompt('Dictionary.com Search:'); if(q) location.href='http://dictionary.reference.com/search?r=1&q='+escape(q); })() 翻译选中的单词,美中不足的是英英翻译,适合英语有一定水平的朋友。 restore selecting 复制代码 代码如下:javascript:(function() { function R(a){ona = "on"+a; if(window.addEventListener) window.addEventListener(a, function (e) { for(var n=e.originalTarget; n; n=n.parentNode) n[ona]=null; }, true); window[ona]=null; document[ona]=null; if(document.body) document.body[ona]=null; } R("click"); R("mousedown"); R("mouseup"); R("selectstart"); })(); 有些网站禁止选择文本,它可以恢复之。貌似chrome用不了。 清除网站的cookies 复制代码 代码如下:javascript:(function(){C=document.cookie.split("; ");for(d="."+location.host;d;d=(""+d).substr(1).match(/..*$/))for(sl=0;sl<2;++sl)for(p="/"+location.pathname;p;p=p.substring(0,p.lastIndexOf('/')))for(i in C)if(c=C[i]){document.cookie=c+"; domain="+d.slice(sl)+"; path="+p.slice(1)+"/"+"; expires="+new Date((new Date).getTime()-1e11).toGMTString()}})() 清除网站的cookies,Chrome用不了。 开发者工具 Reload CSS 复制代码 代码如下:javascript:void(setInterval(function(){var qs='?'+new Date().getTime(),l,i=0;while(l=document.getElementsByTagName('link')[i++]){if(l.rel&&'stylesheet'==l.rel.toLowerCase()){if(!l._h)l._h=l.href;l.href=l._h+qs}}},2000)); 让网页不断的重载CSS。 Spry Media 复制代码 代码如下:javascript:function fnStartDesign(sUrl) {var nScript = document.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'); 十分强大的工具。包含:网格,标尺,单位测量,十字线。建议web设计师试一下。 Layout Grid 复制代码 代码如下:javascript:void(myDiv=document.createElement('div'));void(myBody=document.getElementsByTagName('body')[0]);void(myDiv.style.background='url(http://www.andybudd.com/images/layoutgrid.png)');void(myDiv.style.position='absolute');void(myDiv.style.width='100%');void(myDiv.style.height='100%');void(myDiv.style.top='0');void(myDiv.style.left='0');void(myBody.appendChild(myDiv)); 生成漂亮的网格。 Print Screen 复制代码 代码如下:javascript:window.location='http://aviary.com/' + location.href; 又一个推荐的工具。截取当前网页,更可以自动进入aviary.com编辑该图片。 Download as PDF 复制代码 代码如下:javascript:void(window.open('http://www.pdfdownload.org/web2pdf/Default.aspx?left=0&right=0&top=0&bottom=0&page=0&cURL='+document.location.href)); 存储网页为pdf文件。 再提一句,Spry Media真的很好用。偶尔因为网速慢,可能导致不能正常运行,其它的都是经过测试的,效果不错。使用后,先打开想要操作的页面, 然后复制脚本代码,拷贝到IE地址栏中,回车运行即可(不能点后面的重新加载)

  推荐阅读

  MC Dialog js弹出层 完美兼容多浏览器(5.6更新)

效果图:MC Dialog 功能特点 1.支持键盘操作(esc关闭,enter执行当前获得焦点按钮的事件,屏蔽了ctrl键盘,屏蔽了tab键真正实现了一个模拟浏览器自带对话框的功能) 2.支持焦点智能移动(当焦点移出层外时,自动将焦点>>>详细阅读


本文标题:10个实用的脚本代码工具

地址:http://www.17bianji.com/kaifa2/JS/26477.html

关键词: 探索发现

乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

网友点评
自媒体专栏

评论

热度

精彩导读
栏目ID=71的表不存在(操作类型=0)