Header Ads

Why Javascript interpretation in the URL box doesn't work any more??

When I started learning JavaScript , I learnt that Browser can interpret and execute JavaScript command. On the other hand  java Script command is nothing but series of commands.So if someone wants to run JavaScript in URL they can do that. But there is one syntax .
Lets see what is the syntax:
1.We need to provide "JavaScript" followed by a colon(":") and then the command.
2. Now give semicolon(";") and press enter
Lets see how it works:


javascript:alert("Hi from URL);

Browser detects if after javascript there is any colon exists or not. If it is there browser need to process the request and interpret otherwise it will try to find the same in www.























Wow!!! it is working in Internet Explorer(IE).

I tried the same in Mozilla and Chrome . To my surprise it is not working.Why so ...I tried google.
I found a thread in Mozilla http://support.mozilla.org/en-US/questions/864607 the request was "

Javascript interpretation in the URL box doesn't work any more.

While checking out more I found https://bugzilla.mozilla.org/show_bug.cgi?id=656433 this report. It is showing this feature is blocked.
Why??
I found a satisfactory reply
Gavin Sharp (use gavin@gavinsharp.com for email) 2011-05-11 14:09:52 PDT

As per him



"I liked the idea of a paste-specific approach, since that leaves only relatively impractical attack alternatives (convincing users to manually type part of it in, having them paste it in the error console instead, etc.)"

I remember that while Orkutting in my early days I use to send Scraps To All Orkut Friends At Once .

I remember I used the below written code to scrap all of my friends.
javascript:d=document;c=d.createElement(‘script’);d.body.appen

This is taken from http://www.darkorkut.com/send-a-common-scrap-to-all-your-orkut-friends-at-once/


Again

The popular social networking site Orkut has become a worldwide rage. We will compille a list of all the orkut tricks which will spice up your orkut experience. There would b many orkut users on frendz4m i am also so i am doing these... These javascripts are to be pasted in the browser only. No need to download any software . All the Javascripts should be pasted in single line.
1)Invisible Post Trick in orkut: While posting a topic or writing a scrap, just write [/i] in the post. 

2)Vertical Text: Paste the following javascript in your web browser address bar after navigating to the specified orkut page. [I]javascript:var a=document.getElementsByTagName (' textarea') [0 ];a.value=a.value.replace (/|/g," ");void(0) ; This can be done on any orkut page where you can post eg. scrapbook, community reply page etc. after writing the text. The text you wrote will now be vertically aligned!

 3) Colorful Look: This orkut-trick Gives a colorful look to all links on the page. Run this script on any page and the links will be shown in different colors! Paste the following javascript in your web browser address bar after navigating to the specified orkut page. javascript: mwunm=0 ; c= ["maroon","blue","purple"," green"]; a=document.links;setInterval ('mwunm ;a [ mwunm % document.links.length].style.color=c [ mwunm % c.length]',10) ;void(0) 

4) Reverse Text: Ever wanted to write in reverse scraps in orkut ? make you dream true.This script can be used to reverse the text. Just write any text in a scrapbook or a community thread reply. And run the given script in your browser address bar. Paste the following javascript in your web browser address bar after navigating to the specified orkut page. javascript:txt = document.getElementsByTagName (' textarea') [0 ];txt.value=txt.value.match (/./gi).reverse(). join ('');void(0)

Taken from http://hacknow.wapka.mobi/site_20.xhtml

These were fun in those days .Now I came to know that little modification of these can be security violation and can lead to a serious problem.
So this syntax does not work anymore. History!!!! yes it is now a History.
 Image Credit: http://www.seomofo.com
Powered by Blogger.