Awesome JS Tricks

Started by Spartan, May 01, 2011, 08:36:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Spartan

Everyone, just keep posting a bunch of JS tricks.


You can edit any website with this!
javascript:document.body.contentEditable='true'; document.designMode='on'; void 0

What you do:

Step 1 : Go to a website
Step 2 : Copy the javascript line above into the address bar and click enter
Step 3 : Edit anything you want!

*This does not save to ANY website.*

matt88222

More JS Fun!! :

Copy and paste this into the address bar on any website:

javascript:var%20s%20=%20document.createElement('script');s.type='text/javascript';document.body.appendChild(s);s.src='http://erkie.github.com/asteroids.min.js';void(0);

Controls: Arrow Keys to move, space bar to shoot.

Tobs

lol I've not  seen that one matt. Now I'll just be destryoing everywebsite I visit :D
         


Spartan

Hahaha fun!

Check out this one!

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);

Spartan

Heres another:

It makes all the pictures dance haha

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("img"); 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);

matt88222

What was that tobs? I couldn't hear you because I DESTROYED YOUR POST! (Pew Pew Pew) >:)
Haha, but yeah I've wasted a bunch of time destroying websites with that one lol

Those ones that make the images dance are cool, I have to find a good website to use it on though lol

Spartan

One with lots of pictures :D

turtleman918

#7
Quote from: matt88222 on May 01, 2011, 08:49:00 AM
More JS Fun!! :

Copy and paste this into the address bar on any website:

javascript:var%20s%20=%20document.createElement('script');s.type='text/javascript';document.body.appendChild(s);s.src='http://erkie.github.com/asteroids.min.js';void(0);

Controls: Arrow Keys to move, space bar to shoot.

if you copy and paste this one into the url multiple times, it spawns multiple ships :D
turns out you can also combine a few of these

turtleman918

#8
Quote from: Spartan on May 01, 2011, 09:00:54 AM
Heres another:

It makes all the pictures dance haha

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("img"); 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);
slightly edit this one to get the entire website to dance, change "img" to "*"
like so:

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("*"); 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);

Bahraindude_2497

i dont get it... what is js tricks and what do you do??


Chicken walking to GLOBAL DOMINATION!

turtleman918

Quote from: Bahraindude_2497 on May 01, 2011, 02:14:22 PM
i dont get it... what is js tricks and what do you do??
with these all you need to do is copy and paste the codes into any website URL

turtleman918

This one makes the entire page rotate around, its kinda weird actually.


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.all; 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);

Bahraindude_2497

Ok just tried it out...its really cool



Chicken walking to GLOBAL DOMINATION!