I'm using Google Chrome 14.0.794.0 Dev. Today when I tried to copy & paste the following JavaScript into Omnibox:
javascript:var num=3;alert(num*num);
I found out that only "var num=3;alert(num*num);" was pasted. I also Ctrl+Ved in Notepad, and the whole script was pasted, so Google Chrome must have removed the "javascript:" part automatically. For the script to work, I have to type "javascript:" manually. This looks like a phishing-preventing function for me. |
Hi Cookie Lee, I don't have any Chrome/Chromium browser on my computer currently, but I remember I've seen an option (or a "flag" ?) recently in Chrome about JavaScript and browser history. Perhaps it's related to your problem. Hope this help! |
That's right, it works like that for me too. The "javascript:" part is always removed from the beginning of a string paster into omnibox. Definitely phishing/facebook hacking prevention.
What's ironic there is a really simple workaround – both for Cookie Lee and for hackers. You can just add " " (space) before "javascript:". The space will be automatically trimmed by Chrome, but "javascript:" will be left intact. |