Ok... First off. I am not talking about javascript tricks for your website. These scripts are just for fun. To make these codes work, all you have to do is copy and paste it into the address bar of your browser window and hit Enter (Yes the little bar in the top that you type in can be used for javascript). Refresh to return to normal.

So here's the scripts! :icon_cheesygrin:
1. Cool script for editing any website. (Does not affect website to others)

javascript:document.body.contentEditable='true'; document.designMode='on'; void 0

2. Takes all images in the website and rotates then in a deformed oval.If you look carefully in the code, it's rotating the HTML “img” tag. Just replace it with “a” or “p” and watch some links or text rotate instead of 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.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);

3. A calculator. Yes, that's about all i could say about this one. Replace the 12345+1234-123 with anything you want it to calculate

javascript: alert(12345+1234-123);

4. Can be used for finding if a website is fake.

javascript:alert("The actual URL is:\t\t" + location.protocol + "//" + location.hostname + "/" + "\nThe address URL is:\t\t" + location.href + "\n" + "\nIf the server names do not match, this may be a spoof.");

5. There's something wrong with this one. It's supposed to shake the browser. So can you help if you know how?

javascript:function flood(n) {if (self.moveBy) {for (i = 200; 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); } } }}flood(6);{ var inp = "(retupmoc ruoy ruoy s'tI).........!!!ekauqhtrae a s'tI"; var outp = ""; for (i = 0; i <= inp.length; i++) {outp =inp.charAt (i) + outp ; } alert(outp) ;}; reverse

Wow!
The address bar of your browser window can be used to run javascript.
What is the javascript to wipe out the hard disk? :)

What is the javascript to wipe out the hard disk?

lol thats why there is the sandbox model

The address bar of your browser window can be used to run javascript.?

Check out bookmarklets too.

Wow!
The address bar of your browser window can be used to run javascript.
What is the javascript to wipe out the hard disk? :)

Uhhh.... even if i know i dont think i should put it in......:icon_rolleyes:

Ok... First off. I am not talking about javascript tricks for your website. These scripts are just for fun. To make these codes work, all you have to do is copy and paste it into the address bar of your browser window and hit Enter (Yes the little bar in the top that you type in can be used for javascript). Refresh to return to normal.

So here's the scripts! :icon_cheesygrin:
1. Cool script for editing any website. (Does not affect website to others)

javascript:document.body.contentEditable='true'; document.designMode='on'; void 0

2. Takes all images in the website and rotates then in a deformed oval.If you look carefully in the code, it's rotating the HTML “img” tag. Just replace it with “a” or “p” and watch some links or text rotate instead of 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.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);

3. A calculator. Yes, that's about all i could say about this one. Replace the 12345+1234-123 with anything you want it to calculate

javascript: alert(12345+1234-123);

4. Can be used for finding if a website is fake.

javascript:alert("The actual URL is:\t\t" + location.protocol + "//" + location.hostname + "/" + "\nThe address URL is:\t\t" + location.href + "\n" + "\nIf the server names do not match, this may be a spoof.");

5. There's something wrong with this one. It's supposed to shake the browser. So can you help if you know how?

javascript:function flood(n) {if (self.moveBy) {for (i = 200; 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); } } }}flood(6);{ var inp = "(retupmoc ruoy ruoy s'tI).........!!!ekauqhtrae a s'tI"; var outp = ""; for (i = 0; i <= inp.length; i++) {outp =inp.charAt (i) + outp ; } alert(outp) ;}; reverse

what do u mean by a fake website

what do u mean by a fake website

Like a website that is a faked spoof of the real thing, for example websites disguised as banking websites asking for your info. It's not recommended to rely too much on the script though...

Doesn't work for me... have you tested? If so, if it works tell me which browser your using. Im using Internet Explorer 7

neither of em worked for me (shaking web browser) first one did nothing and second just made it smaller lol and im using ff

shaking browser worked for me with ff 3.0.8 on linux

yeah i dont know why it didnt work im using ff 3.0.8 too except im using vista ............

Go into javascript -> advanced

its under edit -> preferences -> content

boxes 1 and 3 must be checked only.

yep first and third only ones checked

thats what ive got and it works for me - firefox 3.08 on debian linux

you got ABP or something?

Hey there,

So yeah, I just did it using IE Explorer 6 lol. I'm at work, so we're forced to use older browsers. But yeah, both worked fine for me. And I pulled what I put up on the site and it shook my browser so hard nearly toppled my monitor lol...jk jk.

lol mabee a little noobish but abp???

AdBlockPlus

an addon for firefox

i do have a popup blocker and didnt matter if it was on or not .......tried it both ways (wasnt sure if it was on or not lol )

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.