October 5, 2012

How to Have Fun With Your Address Bar on Your Browser


Tricks' Codes

Shake the Browser Window

  • Copying and pasting the following code into your address bar will shake the browser window a little:
javascript:function Shw(n) {
    if (self.moveBy) {
        for (i = 35; 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);
            }
        }
    }
}
Shw(6);

See the actual URL of a page

  • Copying and pasting the following code into your address bar will display the actual URL of the page you're currently viewing. This might be useful in detecting some phishing sites.
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.");

Make images in a page fly

  • Copying and pasting the following code into your address bar will create a nice effect with the images in the page.
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+<wbr>x3)*x4+x5)+"px";
            DIS.top=(Math.cos(R*y1+i*y2+<wbr>y3)*y4+y5)+"px";
        }
        R++;
    }
setInterval('A()',5);
void(0);

Edit Any Website (or at least, look like you are!)

  • Copying and pasting the following code into your address bar will make it look like you can edit the contents of any website out there! You won't actually be editing it though.
javascript:document.body.contentEditable='true';
    document.designMode='on'; 
    void(0);

Unmask a password (Gmail)

  • Copying and pasting the following code into your address bar will display a message box with the password in a gmail login window.
javascript: alert(document.getElementById('Passwd').value);

Go back or forward in your browsing history

  • Copying and pasting the following code into your address bar will make the same effect as pressing the forward and back buttons of your browser.
  • Going Back:
javascript: back();
  • Going Forward:
javascript: forward();

Display a message box

javascript: alert('message here');

Check to see when the Page was last Modified

javascript:document.write(document.lastModified);

Create a false virus warning message

javascript: confirm('your computer can been infected by a deadly virus, you need more virtual memory. press yes to continue this procces'); 
alert('continuing anyway');

EditTips

  • Depending on your browser, some of the above tricks may not work.
  • Make sure you make the code into one line without deleting any curly braces before copying and pasting them into the address bar.
  • The tricks above are simple Javascript codes that are not harmful.
- Comments

No comments :

Post a Comment