Page 1 of 1

(Fx bug) 'javascript:' bookmarklets from about:newtab

Posted: Mon Jan 26, 2015 2:03 pm
by corvus
Hi,

I found a bug and tested it on 2.6.9.11rc1.

'javascript:' bookmarklets don't fully work when launched from about:newtab (while about:blank is ok).

about:newtab is what you get in new tab in my version of Firefox, while about:blank was set as my homepage.

And the way it doesn't work is rather interesting:
- if JS is disabled for about:newtab, then page-replacing JS doesn't work; page-altering does, but url doesn't save - it is erased on reload;
- if JS is allowed for about:newtab, then both types don't have any effect and are erased on reload

URLs used are the following:
for replacing:
javascript:"aa"
for altering:
javascript:document.title="aa"

And the workarounds are to allow scripts globally in NoScript, or to use about:blank instead. Then both types have effect and are saved on reload - while altering worked strangely on about:blank, it did at least have some effect.

UPD: I was wrong on that strike-through part - it's not dependent on NoScript. It seems like Firefox Bug 728313 - Bookmarklet fails on about:newtab. In fact, with NoScript it works somewhat better (see above). :)

Re: Bug with 'javascript:' bookmarklets from about:newtab

Posted: Mon Jan 26, 2015 3:07 pm
by therube
Oh, don't hold me to it, but, viewtopic.php?f=10&t=19721&p=69861#p69861.

Re: Bug with 'javascript:' bookmarklets from about:newtab

Posted: Mon Jan 26, 2015 5:05 pm
by corvus
therube wrote:Oh, don't hold me to it, but, viewtopic.php?f=10&t=19721&p=69861#p69861.
Sorry, you're right, it's a Firefox bug. I'll edit the post.