Bookmarklet reality check

Bug reports and enhancement requests
Post Reply
agaxwmtp
Posts: 13
Joined: Fri Jan 11, 2013 10:14 pm

Bookmarklet reality check

Post by agaxwmtp »

I hardly ever use bookmarklets. There are a few threads taking about Noscript having some issues with them. The threads are technical and I don't understand.

Could somebody explain in a non-technical way what sorts of issues/problems Noscript is having with bookmarklets?

Also - is there some easy way to be certain bookmarklets will work? I mean, if I want to use bookmarklets on example.com - is there some setting that will help ensure that they work?
Mozilla/5.0 (Windows NT 6.2; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Bookmarklet reality check

Post by Giorgio Maone »

agaxwmtp wrote: Could somebody explain in a non-technical way what sorts of issues/problems Noscript is having with bookmarklets?
You normally couldn't execute any bookmarklet on a page where scripts are disabled, e.g. by NoScript.
Therefore NoScript provides, as a "courtesy" usability feature, a bookmarklet emulation feature which so far managed to run almost any bookmarklet even on script-disabled pages, by running their code in a sandbox and/or temporarily enabling scripts just for the time of the bookmarklet execution.
The way Firefox handles JavaScript executed in a sandbox or on a page where scripts have been disabled after installing event handlers has changed in Firefox 27, breaking NoScript's bookmarklet emulation mode.
The many threads you could recently see about bookmarklets are caused by this breakage and my attempts to work around it.
agaxwmtp wrote: Also - is there some easy way to be certain bookmarklets will work? I mean, if I want to use bookmarklets on example.com - is there some setting that will help ensure that they work?
Installing latest development build 2.6.8.17rc1 should suffice most of the time, but some bookmarklets may require you to allow at least the page where you want to run them.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: Bookmarklet reality check

Post by Thrawn »

agaxwmtp wrote: Also - is there some easy way to be certain bookmarklets will work? I mean, if I want to use bookmarklets on example.com - is there some setting that will help ensure that they work?
In some cases, you could convert them into NoScript surrogate scripts.
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.

True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0
agaxwmtp
Posts: 13
Joined: Fri Jan 11, 2013 10:14 pm

Re: Bookmarklet reality check

Post by agaxwmtp »

Thrawn wrote:
agaxwmtp wrote: Also - is there some easy way to be certain bookmarklets will work? I mean, if I want to use bookmarklets on example.com - is there some setting that will help ensure that they work?
In some cases, you could convert them into NoScript surrogate scripts.
There's such a thing as "NoScript surrogate scripts"? Can a non-programmer write them? Ha, even if non-programmer can't - could somebody explain them a bit or give me a link or two to look at?
Mozilla/5.0 (Windows NT 6.2; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0
barbaz
Senior Member
Posts: 10847
Joined: Sat Aug 03, 2013 5:45 pm

Re: Bookmarklet reality check

Post by barbaz »

agaxwmtp wrote:There's such a thing as "NoScript surrogate scripts"? Can a non-programmer write them? Ha, even if non-programmer can't - could somebody explain them a bit or give me a link or two to look at?
http://hackademix.net/2011/09/29/script ... reference/
sources pref url pattern takes any of these syntax:
http://noscript.net/abe/abe_rules.pdf wrote:• ^https?://some\.site\.com/.*
regular expression
• *.some.site.com
(matches anything.some.site.com but not some.site.com) or
.some.site.com (matches anything.some.site.com and some.site.com)
glob expression; a glob expression starting with “.” will match both the subdomains having
it as a suffix and the domain stripped of the leading dot.
• www.some.site.com
domain literal
• http://www.somesite.com
URI literal with “starts with” matching
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: Bookmarklet reality check

Post by Thrawn »

Depending on the bookmarklet, you might just be able to just copy and paste it. See http://forums.informaction.com/viewtopi ... 191#p67715
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.

True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0
Post Reply