PDA

View Full Version : Trippy thing to do with "Google Images"



iLOVENZB
04-09-2009, 03:12 PM
Go to "Google Images" (http://images.google.com.au/imghp?hl=en&tab=wi)

Search for anything...

Remove the URL from the Address bar and add


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.to

Press enter...

Gotta love Javascript :P.

backlash
04-09-2009, 10:34 PM
nothing happens.

Skiz
04-10-2009, 02:00 AM
nothing happens.

Ditto.

Glitterstep
04-10-2009, 03:35 AM
Same here....:(

iLOVENZB
04-10-2009, 09:22 AM
You all sure? Worked for me.

What's meant to happen is all the images swirl around.

Make sure you searched through Google images (and not Google 'web'), then remove the URL and add

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.to

PS: I used FF?

tesco
04-10-2009, 02:03 PM
Your code was cut off.
And btw it works on any page. Even here. :)


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()',50); void(0);

KFlint
04-10-2009, 05:31 PM
Yup, and the result here is far more interesting

DOM manipulation brings joy in our lives :01:

Skiz
04-10-2009, 10:02 PM
Still doesn't work for me.

tescos code, when entered, simply removes all the images from the page. :huh:

tesco
04-10-2009, 10:44 PM
Still doesn't work for me.

tescos code, when entered, simply removes all the images from the page. :huh:
scroll to the top. :unsure:

backlash
04-10-2009, 11:10 PM
thanks! NOW it works. Cool stuff.

100%
04-10-2009, 11:56 PM
Tesco fixed it.
Nice
but why does this happen?

tesco
04-11-2009, 12:35 AM
Tesco fixed it.
Nice
but why does this happen?
It's just what that js code does.
It finds all <img> tags on the page then starts moving them around.
You can change the code to do any other tag as well like div, span, strong, table, a, etc.:P

_Trivium_
04-11-2009, 01:01 AM
haha thats awsome lol

thanks for that

ronscores
04-11-2009, 02:10 AM
Tesco fixed it.
Nice
but why does this happen?
It's just what that js code does.
It finds all <img> tags on the page then starts moving them around.
You can change the code to do any other tag as well like div, span, strong, table, a, etc.:P

Real awesome.
You a java coder btw?

tesco
04-12-2009, 02:16 PM
It's just what that js code does.
It finds all <img> tags on the page then starts moving them around.
You can change the code to do any other tag as well like div, span, strong, table, a, etc.:P

Real awesome.
You a java coder btw?
no.:unsure:

Snee
04-12-2009, 05:55 PM
It's just what that js code does.
It finds all <img> tags on the page then starts moving them around.
You can change the code to do any other tag as well like div, span, strong, table, a, etc.:P

Real awesome.
You a java coder btw?

javascript != java.

-=-=-

We once toyed with the idea of screwing up someone else's start page in their browser with a script like that, as a practical joke, like.

Was gonna put the original page in a frame, or use it as the source for an object, and then stick that in a new page and add the script to it. Maybe calling it onload, with a bit of a delay so it looked normal first. Just never got around to it.

You can mess around a bit with the numbers in the equation and positioning, as well.


javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=1000; 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()',50); void(0)

changes its position.


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*x3+x3)*x4+x5)+"px"; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"}R++}setInterval('A()',50); void(0)
Makes them move in another pattern. etc.

KFlint
04-13-2009, 12:01 AM
Real awesome.
You a java coder btw?

JavaScript = client-side, executes in your browser
Java = server-side to generate dynamic HTML pages or for standalone apps.

Anyone coding web applications deal with Javascript to add interaction to the pages (AJAX, form validation etc...) whether they are coding in PHP, Java, Ruby etc...

Hope that's enlightening for a neophyte

SaveFerris
04-14-2009, 11:57 PM
I made my own version of one of these when bored in school a few months back.

javascript:amm=20;sta=2;vri=8;stH=40;saW=screen.availWidth;fiA="<img src='http://fish.sferris.net/f3.png' />";fiB="<img src='http://fish.sferris.net/f2.png' />";poA=new Array();poB=new Array();i=0;for(i=0;i<amm;i++){poA[i]=Math.round(Math.random()*saW);ff=document.createElement("div");ff.innerHTML=fiA;ff.id="fA"+i;ff.style.position='absolute';ff.style.left=poA[i]+"px";ff.style.top=(i*stH)+"px";document.body.appendChild(ff)}for(i=0;i<amm;i++){poB[i]=Math.round(Math.random()*saW);ff=document.createElement("div");ff.innerHTML=fiB;ff.id="fB"+i;ff.style.position='absolute';ff.style.left=poB[i]+"px";ff.style.top=((i*stH)+(stH/2))+"px";document.body.appendChild(ff)}function lFi(){for(i=0;i<amm;i++){poA[i]+=(Math.random()*vri)+sta;if(poA[i]>saW)poA[i]=-100;document.getElementById("fA"+i).style.left=poA[i]+"px"}for(i=0;i<amm;i++){poB[i]-=(Math.random()*vri)+sta;if(poB[i]<-100)poB[i]=saW;document.getElementById("fB"+i).style.left=poB[i]+"px"}}lf=setInterval("lFi()",25);void(0)
Scroll to the top of the page.

iLOVENZB
04-15-2009, 12:25 AM
I made my own version of one of these when bored in school a few months back.

OMG Nemo lol.

mikeHD
04-15-2009, 01:59 PM
Cool parlor tricks.

tesco
04-17-2009, 10:18 PM
I made my own version of one of these when bored in school a few months back.

javascript:amm=20;sta=2;vri=8;stH=40;saW=screen.availWidth;fiA="<img src='http://fish.sferris.net/f3.png' />";fiB="<img src='http://fish.sferris.net/f2.png' />";poA=new Array();poB=new Array();i=0;for(i=0;i<amm;i++){poA[i]=Math.round(Math.random()*saW);ff=document.createElement("div");ff.innerHTML=fiA;ff.id="fA"+i;ff.style.position='absolute';ff.style.left=poA[i]+"px";ff.style.top=(i*stH)+"px";document.body.appendChild(ff)}for(i=0;i<amm;i++){poB[i]=Math.round(Math.random()*saW);ff=document.createElement("div");ff.innerHTML=fiB;ff.id="fB"+i;ff.style.position='absolute';ff.style.left=poB[i]+"px";ff.style.top=((i*stH)+(stH/2))+"px";document.body.appendChild(ff)}function lFi(){for(i=0;i<amm;i++){poA[i]+=(Math.random()*vri)+sta;if(poA[i]>saW)poA[i]=-100;document.getElementById("fA"+i).style.left=poA[i]+"px"}for(i=0;i<amm;i++){poB[i]-=(Math.random()*vri)+sta;if(poB[i]<-100)poB[i]=saW;document.getElementById("fB"+i).style.left=poB[i]+"px"}}lf=setInterval("lFi()",25);void(0)Scroll to the top of the page.
That's cool. There's a bug in it though. The fishes swim too far to the right.:unsure:

Bone.W.Machine
04-17-2009, 10:23 PM
I made my own version of one of these when bored in school a few months back.

javascript:amm=20;sta=2;vri=8;stH=40;saW=screen.availWidth;fiA="<img src='http://fish.sferris.net/f3.png' />";fiB="<img src='http://fish.sferris.net/f2.png' />";poA=new Array();poB=new Array();i=0;for(i=0;i<amm;i++){poA[i]=Math.round(Math.random()*saW);ff=document.createElement("div");ff.innerHTML=fiA;ff.id="fA"+i;ff.style.position='absolute';ff.style.left=poA[i]+"px";ff.style.top=(i*stH)+"px";document.body.appendChild(ff)}for(i=0;i<amm;i++){poB[i]=Math.round(Math.random()*saW);ff=document.createElement("div");ff.innerHTML=fiB;ff.id="fB"+i;ff.style.position='absolute';ff.style.left=poB[i]+"px";ff.style.top=((i*stH)+(stH/2))+"px";document.body.appendChild(ff)}function lFi(){for(i=0;i<amm;i++){poA[i]+=(Math.random()*vri)+sta;if(poA[i]>saW)poA[i]=-100;document.getElementById("fA"+i).style.left=poA[i]+"px"}for(i=0;i<amm;i++){poB[i]-=(Math.random()*vri)+sta;if(poB[i]<-100)poB[i]=saW;document.getElementById("fB"+i).style.left=poB[i]+"px"}}lf=setInterval("lFi()",25);void(0)Scroll to the top of the page.
That's cool. There's a bug in it though. The fishes swim too far to the right.:unsure:Perhaps they're supposed to do so.
Or maybe your doobies put your cordination out of control? :naughty:

tesco
04-17-2009, 11:38 PM
That's cool. There's a bug in it though. The fishes swim too far to the right.:unsure:Perhaps they're supposed to do so.
Or maybe your doobies put your cordination out of control? :naughty:
actually they are supposed to do it but they're not supposed to be in the viewable area. The way it is now creates scroll bar at the bottom of the screen whenever they swim to the right..;)

SaveFerris
04-18-2009, 04:54 PM
I made my own version of one of these when bored in school a few months back.

javascript:amm=20;sta=2;vri=8;stH=40;saW=screen.availWidth;fiA="<img src='http://fish.sferris.net/f3.png' />";fiB="<img src='http://fish.sferris.net/f2.png' />";poA=new Array();poB=new Array();i=0;for(i=0;i<amm;i++){poA[i]=Math.round(Math.random()*saW);ff=document.createElement("div");ff.innerHTML=fiA;ff.id="fA"+i;ff.style.position='absolute';ff.style.left=poA[i]+"px";ff.style.top=(i*stH)+"px";document.body.appendChild(ff)}for(i=0;i<amm;i++){poB[i]=Math.round(Math.random()*saW);ff=document.createElement("div");ff.innerHTML=fiB;ff.id="fB"+i;ff.style.position='absolute';ff.style.left=poB[i]+"px";ff.style.top=((i*stH)+(stH/2))+"px";document.body.appendChild(ff)}function lFi(){for(i=0;i<amm;i++){poA[i]+=(Math.random()*vri)+sta;if(poA[i]>saW)poA[i]=-100;document.getElementById("fA"+i).style.left=poA[i]+"px"}for(i=0;i<amm;i++){poB[i]-=(Math.random()*vri)+sta;if(poB[i]<-100)poB[i]=saW;document.getElementById("fB"+i).style.left=poB[i]+"px"}}lf=setInterval("lFi()",25);void(0)Scroll to the top of the page.
That's cool. There's a bug in it though. The fishes swim too far to the right.:unsure:
They swim until their entire body is off-screen, then flick back to the left. Yes this does cause problems as browsers try to stretch the page to fit but I haven't found an easy fix. I think there's a way to tell a page not to display horizontal scroll-bars but haven't looked into it, the other solution would be to use the CSS cropping function to cut them down as they slide out of view, but that would be way too much work.

RedRansom
04-20-2009, 08:27 AM
Your code was cut off.
And btw it works on any page. Even here. :)


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()',50); void(0);
that's really cool and working like a charm...
I hope you're kind enough to say me how can i will find all direct links of images on a web page? :unsure:

tesco
04-20-2009, 11:16 PM
Using javascirpt?

RedRansom
04-21-2009, 12:47 AM
Doesnt matter..
Just i need to find direct image links on some pages, pictures are thumbnail format...
And when i saw this topic and flying images i thought this should be more compliated than what i am looking for :unsure:
I was using bulk image grabber for grab images but it's not working anymore...If i can get images direct links i can download all one easyly with a download manager(like flashget,internet download manager)

tesco
04-25-2009, 03:30 PM
javascript:imgurls='';imgurlsdup=new Array;count=document.images.length;for(i=0;i<count;i++){if (!imgurlsdup[document.images[i].src]) {imgurlsdup[document.images[i].src]=true;imgurls=imgurls+'<br />'+document.images[i].src;}}document.write(imgurls);You can paste that into the address bar.

RedRansom
04-25-2009, 07:27 PM
Thank you sir...(It's just giving links of thumbnail not orginal photos but obviously this will help me as well.)
This javascript issue looking very helpful for who interest in photos.:unsure:

tesco
04-25-2009, 09:48 PM
Well if there's something specific you want me to make for you I might be able to do it if it's not going to take me too long.
You have to show me the site or give me some examples of how they code the thumbnail/links. ;)

RedRansom
04-26-2009, 03:54 PM
The site is hotcelebshome.com...Most photos from imagevenue,imagebam and imageshack and links format with thumbnail and as you know when click on it, it's directing to orginal photo link(which is much higher quality and big)...
But i found a firefox tool which is really good for what i was looking 4(that called "Imagegrabber" is a firefox extension)...
Thank you so much for interest in my case...(I dont want to spend your time such as random case and which is already done by some1)
But really interesting after this topic i will very into javascript :unsure:

darkstate01
05-29-2009, 12:38 PM
Works for me. Who makes up these things?
Do you think coders wake up 1 morning and think ,today i think i'll invent some code that sends pictures rolling around peoples screens.

TroJan
06-04-2009, 08:21 PM
thx

rikenji
07-27-2009, 08:52 AM
Interesting. But also sorta useless unless someone ingenius can make a message AFTER the swirl

Rart
08-30-2009, 06:10 PM
This reminded me of something that's completely unrelated but kind of interesting as well.

If you press "up, up, down, down, left, right, left, right, b, a, Enter, on Facebook, every time you click it'll flash these circles on your screen. A tribute to a famous konami cheat code.

tesco
08-30-2009, 09:18 PM
This reminded me of something that's completely unrelated but kind of interesting as well.

If you press "up, up, down, down, left, right, left, right, b, a, Enter, on Facebook, everytime to click it'll flash these circles on your screen. A tribute to a famous konami cheat code.
ha. It worked.

iLOVENZB
08-31-2009, 12:28 PM
This reminded me of something that's completely unrelated but kind of interesting as well.

If you press "up, up, down, down, left, right, left, right, b, a, Enter, on Facebook, everytime to click it'll flash these circles on your screen. A tribute to a famous konami cheat code.
ha. It worked.

:w00t: I don't want to know how he found that out :unsure:

sez
09-01-2009, 10:29 PM
And on a further unrelated topic:

javascript:alert(c=1000000)
Paste that into the address bar when the other guy looks away while downloading from RS as a free user :P.

Also was gmail being Ddosed?

Rart
09-04-2009, 01:50 AM
Not sure why its in this thread but this post explains it.

http://gmailblog.blogspot.com/2009/09/more-on-todays-gmail-issue.html

grube
09-21-2009, 08:50 PM
hehe works here.

cool stuff.

oxxo
09-30-2009, 06:30 PM
It works. Nice.

dodgy368
10-07-2009, 07:55 PM
Cool stuff, made me laugh.:lol:

Burnsy
10-07-2009, 08:03 PM
WOW... that's pretty cool :)

juGGaKNot
10-14-2009, 06:49 AM
ye ty for info

nadav2217
10-15-2009, 03:24 PM
very cool

mizo3390
10-18-2009, 06:53 AM
nothing happens shows me apage like asearsh in the web

kooltilldend
10-18-2009, 08:31 PM
yeah did this long time back...fun stuff!

ddt
10-21-2009, 07:03 PM
thx, nice

Yacube7
10-25-2009, 11:07 PM
thanks! NOW it works. Cool stuff.

I'm actually lost but, some one will call me a spammer to gratify themselves. What?:blink: