Bookmarklets doesn't work when called from about:blank

Ask for help about NoScript, no registration needed to post
jerryawallace

Bookmarklets doesn't work when called from about:blank

Post by jerryawallace »

Hi there,
I got a few simple bookmarklets that won't work anymore with Firefox 3.5/Noscript when called from about:blank

Example here.
If I refer to the example:
1. Open a new tab
2. type "lh" in address bar
Result = not working

1. Open a new tab
2. Open any page on the noscript whitelist
3. type "lh" in address bar
Result = works

about:blank is on the whitelist but the bookmarklets won't execute. Tried latest NoScript version and development build but no luck. I think it stopped working since Firefox 3.5 (not 100% sure). Am I missing something?

Appreciate the help
Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Bookmarklets doesn't work when called from about:blank

Post by therube »

Looks to be unrelated to NoScript.
I don't see a simple LH working at all. It still is returning, http://lifehacker.com/search/%s rather then http://lifehacker.com/.
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; U; Windows NT 5.1; en-US; rv:1.9.1pre) Gecko/20090627 SeaMonkey/2.0b1pre
jerryawallace

Re: Bookmarklets doesn't work when called from about:blank

Post by jerryawallace »

Hi,

just tested this with a new profile:

Code: Select all

javascript:if('%s') location.href='http://lifehacker.com/search/%s';else location.href='http://lifehacker.com/';
as bookmark address and lh as a keyword. Works perfectly. lh redirects to lifehacker.com and lh keyword redirects to http://lifehacker.com/search/keyword

Also it worked for several months with Firefox 3.*, Noscript and several other addons. Maybe Mozilla changed something strange about the way about:blank gets handled with the 3.5 Update and now Noscript won't recognize about:blank correctly?
Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Bookmarklets doesn't work when called from about:blank

Post by therube »

?

Code: Select all

javascript:if('%s') location.href='http://lifehacker.com/search/%s';else location.href='http://lifehacker.com/';
Typing the above into the URL bar in FF2, FF3, & FF3.5 - all with NoScript disabled, all yield:
Bad Request

Your browser sent a request that this server could not understand.
And leave me at this URL: http://lifehacker.com/search/%s
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; U; Windows NT 5.1; en-US; rv:1.9.1pre) Gecko/20090627 SeaMonkey/2.0b1pre
jerryawallace

Re: Bookmarklets doesn't work when called from about:blank

Post by jerryawallace »

Hi,

very strange. I did a quick screencast to show the stuff i try to achieve:
http://www.screencast.com/t/llbPrlVD

Done with a blank Firefox 3.5.
Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Bookmarklets doesn't work when called from about:blank

Post by therube »

And if you start FF in Safe Mode do you get the same results?
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; U; Windows NT 5.1; en-US; rv:1.9.1pre) Gecko/20090627 SeaMonkey/2.0b1pre
jerryawallace

Re: Bookmarklets doesn't work when called from about:blank

Post by jerryawallace »

Hi,

yes the bookmarklets also work with my standard profile in safe mode.
Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Bookmarklets doesn't work when called from about:blank

Post by therube »

Anyone else care to chime in?
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; U; Windows NT 5.1; en-US; rv:1.9.1pre) Gecko/20090627 SeaMonkey/2.0b1pre
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Bookmarklets doesn't work when called from about:blank

Post by Giorgio Maone »

It works fine on a clean profile with just NoScript.
Are you using the unofficial development build of Tab Mix Plus?
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)
jerryawallace

Re: Bookmarklets doesn't work when called from about:blank

Post by jerryawallace »

Yes I am. And when I deactivate TMP the problem is gone. Seems to be a known problem? Shame on me for not investigating more :shock:
Just a bug in TMP then? Thanks a lot for the help, guess I'll have to wait for a proper TMP version.

Greetings
Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Bookmarklets doesn't work when called from about:blank

Post by Giorgio Maone »

Please try latest development build 1.9.5.6 :)
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)
jerryawallace

Re: Bookmarklets doesn't work when called from about:blank

Post by jerryawallace »

Works fine, thank you very much!
For most products you can only dream about support like that.
You, sir, are awesome :D
Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Bookmarklets doesn't work when called from about:blank

Post by therube »

And why doesn't it work for me :( ?

Regardless of NoScript, regardless of about:blank, regardless of any extensions, any time I do not include a search parameter, I end up at:

Code: Select all

http://lifehacker.com/search/%s
If I do include a search parameter, it does successfully load the search page as expected.

At no point, does it seem, that the ELSE condition is being fulfilled?

Code: Select all

javascript:if('%s') location.href='http://lifehacker.com/search/%s';else location.href='http://lifehacker.com/';
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; U; Windows NT 5.1; en-US; rv:1.9.1.1pre) Gecko/20090705 SeaMonkey/2.0b1pre
Post Reply