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

Bug reports and enhancement requests
Post Reply
corvus
Posts: 2
Joined: Mon Jan 26, 2015 1:07 pm

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

Post 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). :)
Last edited by corvus on Mon Jan 26, 2015 5:22 pm, edited 1 time in total.
Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:26.0) Gecko/20100101 Firefox/26.0
User avatar
therube
Ambassador
Posts: 7972
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

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

Post by therube »

Oh, don't hold me to it, but, viewtopic.php?f=10&t=19721&p=69861#p69861.
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 5.1; rv:35.0) Gecko/20100101 SeaMonkey/2.32
corvus
Posts: 2
Joined: Mon Jan 26, 2015 1:07 pm

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

Post 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.
Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:26.0) Gecko/20100101 Firefox/26.0
Post Reply