10 Practical scripting code tools _javascript Tips

Source: Internet
Author: User
Here are 10 practical
Browse Secondary
Tidy Read
Copy Code code as follows:
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);d ocument.body.appendChild (s)}) ();

Clean up those messy pages, more free to set preferences, very powerful.

Show Password
Copy Code code as follows:
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.");}) ();

View the password that appears on the Web page as * * *. Find it useful, like when Chrome remembers the password, and when you forget ...

dictionary.com
Copy Code code as follows:
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); })()

Translation of selected words, the ointment is English-English translation, suitable for English has a certain level of friends.

Restore selecting
Copy Code code as follows:
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"); })();

Some sites prohibit the selection of text, which can be restored. Looks like Chrome doesn't work.

Remove cookies from website
Copy Code code as follows:
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 ()}}) ()

The cookies,chrome of the site can not be used.

Developer Tools

Reload CSS
Copy Code code as follows:
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));

Let Web pages constantly overload the CSS.

Spry Media
Copy Code code as follows:
Javascript:function fnstartdesign (sURL) {var nscript = document.createelement (' script '); Nscript.setattribute (' Language ', ' JavaScript '); Nscript.setattribute (' src ', surl);d ocument.body.appendChild (nscript);} Fnstartdesign (' http://www.sprymedia.co.uk/design/design/media/js/design-loader.js ');

A very powerful tool. Includes: Grid, ruler, unit measurement, cross line. Suggest a web designer to try.

Layout Grid
Copy Code code as follows:
Javascript:void (mydiv=document.createelement (' div ')); void (Mybody=document.getelementsbytagname (' body ') [0]); void (mydiv.style.background= ' url (yun_qi_img/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));

Generate a nice grid.

Print Screen
Copy Code code as follows:
Javascript:window.location= ' http://aviary.com/' + location.href;

Another recommended tool. Intercepts the current page, and can automatically enter aviary.com to edit the picture.

Download as PDF
Copy Code code as follows:
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));

Store Web pages as PDF files.

To put it another way, Spry media is really handy.

Occasionally because of slow speed, may cause not normal operation, the others are tested, the effect is good.

After use, first open the page you want to operate, and then copy the script code, copy to the IE Address bar, enter the run can (not point after the reload)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.