Admin Admin
Posts : 42 Join date : 2009-11-26
| Subject: Javascript Tricks Fri Nov 27, 2009 11:18 am | |
| Hey Everyone, I will be showing you some JavaScript codes, these codes are used to edit a site, but not permenantly, just for fun, your edit will only be shown on your computer and just press the "X" button to close it and open it again it will return to normal, so you don't have to worry if it will be permently stuck on your computer Now open any site such as google, enter this code in red on the address box above. Then you will be able to edit the site as in change the words, picture, ect ect.. Code 1: javascript: document.body.contentEditable = 'true'; document.designMode = 'on'; void 0 For the second code which is in blue, can orbit the pictures around in the site. Code 2: 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);For the third code which is in green, can shift everything on the screen. Code 3: 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.getElementsByTagName("div"); 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);
For the fourth which is the last code does a sidewinder. Code 4: 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.tan(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.tan(R*y1+i*y2+y3)*y4+y5}R++ }setInterval('A()',5 ); void(0);Hope you like em | |
|