JavaScript in Omnibar not working

Bug reports and enhancement requests
Post Reply
yeahman
Posts: 3
Joined: Thu Jul 28, 2011 5:28 am

JavaScript in Omnibar not working

Post by yeahman »

JavaScript doesn't work in the address bar when using Omnibar. Works fine if either NS or Omnibar is disable.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a2) Gecko/20110727 Firefox/7.0a2
User avatar
therube
Ambassador
Posts: 7971
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: JavaScript in Omnibar not working

Post by therube »

(Link, I suppose, Omnibar.)

How do you get it to work if NoScript is disabled?
Is there some Preference you need to set to allow JavaScript on the URL bar?

(Related thread, Problems with javascript in the address bar.)

Code: Select all

javascript:alert ("hello world")
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20110706 Firefox/5.0 SeaMonkey/2.2
yeahman
Posts: 3
Joined: Thu Jul 28, 2011 5:28 am

Re: JavaScript in Omnibar not working

Post by yeahman »

therube wrote:

Code: Select all

javascript:alert ("hello world")
That didn't work without NS.

Code: Select all

javascript:1+1
That works without NS, with NS, with Omnibar, but not with NS + Omnibar.

What I really need it for is keyword searching with javascript. For example if you save the following as a bookmark with a keyword:

Code: Select all

javascript:location.href="https://encrypted.google.com/search?q=%s"
Then search using the keyword in the address bar. Works without NS, with NS, with Omnibar, but not with NS + Omnibar.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a2) Gecko/20110727 Firefox/7.0a2
Post Reply