3

Possible Duplicate:
JavaScript alert not working in Firefox 6

I often execute Javascript code in the address bar (mostly for debugging and testing): javascript:alert(some_function_with_interesting_return_value('blah')); Or - more obvious: javascript:alert('interesting value');

This doesn't seem to work anymore with Firefox 6: Error: uncaught exception: ReferenceError: alert is not defined

How is it possible for alert() not to be defined ?

I've double-checked it with Firefox 5, Epiphany, Midori and Chromium - works fine.

Community
  • 1
  • 1
basic6
  • 3,643
  • 3
  • 42
  • 47

1 Answers1

5

I think it's maybe prevention, because a lot of sites abused this.

FYI, I'm probably going to split this bug into multiple, short and longer term fixes.

Short term: disallow pasting of javascript: URLs into the URL bar Longer term: additionally require that bookmarklets be "whitelisted" in the Bookmark Manager before it can run JavaScript

https://bugzilla.mozilla.org/show_bug.cgi?id=527530#c6

Community
  • 1
  • 1
genesis
  • 50,477
  • 20
  • 96
  • 125
  • I see the point, it can be a (security) issue in some (rare) cases. Well, I could run my JS code from Scratchpad, but then I'd have to switch between two windows. Isn't there a way to temporarily allow JS in the location bar? – basic6 Aug 21 '11 at 11:35
  • 1
    @basic6: I'm afraid it's not right now – genesis Aug 21 '11 at 11:36
  • 5
    I'm now using the command line of Firebug which works perfectly (actually better than the location bar). – basic6 Aug 21 '11 at 11:45
  • @basic6: yes. I agree with you – genesis Aug 21 '11 at 11:47