Jun 6, 2009

Cool Javascript Tricks/Codes

Posted by Aayush at 10:38 PM
These are pretty sick javascript codes/(hacks) if you call them. Copy the codes and paste them onto your browser and hit enter.
Remember, you can always Press F5 (Refresh) in order to stop and come back to the website.
  • Calculator : 5+3+2+9-5-3-6+3: Makes a simple calculator that you can use using javacript.
javascript:alert(put your numbers and operation here)

  • "Flying Images": Automatically detects any images on the sites and starts flying them
javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=(Math.sin(R*x1+i*x2+x3)*x4+x5)+"px"; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"}R++}setInterval('A()',5); void(0);
  • Edit Websites: After you enter the code, you can edit the contents of the site, but it wont be permanent.
javascript:document.body.contentEditable='true'; document.designMode='on'; void 0
  • Fake Website identifier: Compares your site protocol and hostname and sees if they are same or not. You can use it as a phising site checker.
javascript:alert("The actual URL is:\t\t" + location.protocol + "//" + location.hostname + "/" + "\nThe address URL is:\t\t" + location.href + "\n" + "\nIf the server names do not match, this may be a spoof.");
  • Annoying Dialogue Box: Pops out a dialogue box that asks you to restart the browser.
    Press Ctrl+Alt+Delete and then go to application and then select your browser and click End Task on the bottom.

javascript:while(1){alert('Restart your brower to close this box!')}

0 comments on "Cool Javascript Tricks/Codes"

Post a Comment


Computer Tutorials Copyright 2009 Reflection Designed by Ipiet Templates Image by Tadpole's Notez