5 Funny JavaScript Codes for your Web browser
Do you remember those funny one line JavaScript codes, that temporarily enable you to destroy web pages in your browser? Let me remind you of some of those. I have made a quick list of five JavaScript one-liners (which are appearing slightly big due to line-wrapping here) that can be used to have fun with your web browser.
Note: Try the below scripts on your own risk. As far as I know, these are not at all harmful. However, I will not be responsible for any damage.
Try these funny scripts just by copying and pasting in your browser’s address bar. Try demo links, in case the scripts are not working in your browser’s address bar.
1. Edit any Web page with the below Script:
javascript:document.body.contentEditable='true';document.designMode='on';void 0;
2. Know how images on a website looks when they move like a wave:
javascript:R=0;x1=.1;y1=.05;x2=.25;y2=.24;x3=1.6;y3=.24;x4=300;y4=200;x5=300;y5=200;var 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++}tag=setInterval('A()',5);document.onmousedown=function(){clearInterval(tag);for(i=0; i<DIL;i++){DI[i].style.position="static";}};void(0);
For those who are using Internet Explorer, wave images:
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;DIS.top=Math.cos(R*y1+ i*y2+y3)* y4+y5;} R++;}setInterval('A()',5);void(0);
3. Experience a Browser Quake for a while:
javascript:function Shw(n){if(self.moveBy){for(i=35; i>0;i--){for(j=n;j>0;j--){self.moveBy(1,i);self.moveBy(i,0);self.moveBy(0,-i);self.moveBy(-i,0);}}}}Shw(6);
4. See how much annoying your browser could be: (this one is really annoying, you might need to open Task Manager to end it)
javascript:a=0;x=0;y=0;setInterval("a+=.01;x=Math.cos(a*3)*200;y=Math.sin(a*2)*2;moveBy(x,y)",2);void(0);
5. Image Enhancements:
javascript:DI=document.images;for(j=0;j<=DI.length;j++){DI[j].src="http://imgboot.com/images/techably/smile.gif";}void(0);
I hope you enjoyed the scripts. Do share with us, if you have more cool scripts. Also see useful JavaScript snippets for your Website.