Always fun to mess around with javascript(though can sometimes be dangerous Wink )

Heres something fun, goto the cemetech main forum page and type this into your browser...

Source: Topic on mix networks
Code:
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);


You can make it do alot of stuff buy just changing the ("img") to a diff tag. Razz

Try changing "img" to "table", does some pretty funny stuff Laughing
Very Happy That's awesome! Nice job, swivel.
Edit: yo, try it with span or td; cool stuff indeed.
0x5, that pwns!
I'd love to figure out a way to randomly insert that into, say, wiki entries. Razz
KermMartian wrote:
I'd love to figure out a way to randomly insert that into, say, wiki entries. Razz



does wikipedia strip javascript out of entries?
Razz Of course, hence the querulous tone of my post. Smile
yes, it does, I have an idea though Very Happy

register wikipedia.cemetech.net and have it be in a frameset, the bottom one being wikipedia, the top having no width, but being javascript Wink
elfprince13 wrote:
yes, it does, I have an idea though Very Happy

register wikipedia.cemetech.net and have it be in a frameset, the bottom one being wikipedia, the top having no width, but being javascript Wink
Very Happy Excellent idea. Too much work though; I'm too lazy to do that.
Wow, that is way cool. Good Idea
A friend showed me this a few days ago, but I thought you guys would know it Laughing

Go to a place like Newgrounds and it slows down a lot o.O
Using it on a forum with the table tag will spin the posts around Laughing

Its awsome Razz
oh wow, that is crazy.
Heh, I tried it on this page and it lagged so badly I couldn't click the Post Reply button. Razz There's gotta be some kind of practical application of this...
yea, must be one. I should do this to my webpage I am creating and show it to people just to freak them out.
How about make the effect randomly start after, say, 3 minutes on a webpage?

onload=setTimeout(60*3*1000,"StartSwirl();");
Or make it gradually speed up Evil or Very Mad

If you keep on entering it than the effect speeds up (discovered this while messing around the other day)
That's strange - I found the opposite. It would generally slow down if I added the effect repeatedly. Wait, did you choose the same HTML tag again or a different one?
same, I have not tried a different one.

It gets a little more jerky, but it moves farther (the faster it goes of course)
KermMartian wrote:
That's strange - I found the opposite. It would generally slow down if I added the effect repeatedly. Wait, did you choose the same HTML tag again or a different one?


Maybe your COMPUTER is lagging? remember javascript IS limited by your computers speed Razz

But Kerm, it definitely does speed up. Go somewhere with small amounts of pictures, and it is much more noticeable
Kllrnohj wrote:
KermMartian wrote:
That's strange - I found the opposite. It would generally slow down if I added the effect repeatedly. Wait, did you choose the same HTML tag again or a different one?


Maybe your COMPUTER is lagging? remember javascript IS limited by your computers speed Razz
That's exactly what I meant. However, I meant I was making it do multiple tags simultaneously by editing the JS. I see what you mean.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement