Feature request:booklet script allow

Bug reports and enhancement requests
Post Reply
pjb
Posts: 1
Joined: Tue May 19, 2009 7:20 pm

Feature request:booklet script allow

Post by pjb »

I would like to run booklet's on pages that are not white listed.

booklet : bookmark eg : "Share on facebook"
Javascript:var%20d=document,f='http://www.new.facebook.com/share',l=d. ... ;try{if%20(!/^(.*\.)?facebook\.[^.]*$/.test(l.host))throw(0);share_internal_bookmarklet(p)}catch(z)%20{a=function()%20{if%20(!window.open(f+'r'+p,'sharer','toolbar=0,status=0,resizable=1,width=626,height=436'))l.href=f+p};if%20(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else{a()}}void(0)
Mozilla/5.0 (Windows; U; Windows NT 5.1; da; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.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: Feature request:booklet script allow

Post by Giorgio Maone »

It should work with latest development build, 1.9.2.93
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729)
User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3369
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Re: Feature request:booklet script allow

Post by GµårÐïåñ »

confirmed, works fine.
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10
Lam
Posts: 3
Joined: Fri Jun 12, 2009 3:26 pm

Re: Feature request:booklet script allow

Post by Lam »

I'm using 1.9.3.3 and a javascript bookmark I'm trying to use is not working unless I disable NoScript. Forbid bookmarklets in the Advanced tab is off. What am I doing wrong?
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1b99) Gecko/20090605 Firefox/3.5b99
Alan Baxter
Ambassador
Posts: 1586
Joined: Fri Mar 20, 2009 4:47 am
Location: Colorado, USA

Re: Feature request:booklet script allow

Post by Alan Baxter »

@Lam:
Please try again with the latest development build, NoScript 1.9.3.92. http://noscript.net/getit#devel
If you still have a problem, please provide more information, such as the bookmark code, its intended effect, and an example web page where the problem is encountered.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Feature request:booklet script allow

Post by therube »

I gather why facebook (or Readability) is now intended to work is because, execute trusted imported scripts (e.g. in the Readability bookmarklet).

Now just what is a "trusted imported script"?
And is it trusted where? Only in the context of the bookmarklet itself?
Does this apply for both bookmarklets & the equivalent extension (if one exists)?

Is the URL reference to the external website in the bookmarklet that would not work prior, but (theoretically) is working now?

Why does the facebook bookmarklet work (at least I do get a popup dialog), where Readability & Tidyread bookmarklets appear not to?

Readability:

Code: Select all

javascript:(function(){readStyle='style-newspaper';readSize='size-large';readMargin='margin-wide';_readability_script=document.createElement('SCRIPT');_readability_script.type='text/javascript';_readability_script.src='http://lab.arc90.com/experiments/readability/js/readability.js?x='+(Math.random());document.getElementsByTagName('head')[0].appendChild(_readability_script);_readability_css=document.createElement('LINK');_readability_css.rel='stylesheet';_readability_css.href='http://lab.arc90.com/experiments/readability/css/readability.css';_readability_css.type='text/css';_readability_css.media='screen';document.getElementsByTagName('head')[0].appendChild(_readability_css);_readability_print_css=document.createElement('LINK');_readability_print_css.rel='stylesheet';_readability_print_css.href='http://lab.arc90.com/experiments/readability/css/readability-print.css';_readability_print_css.media='print';_readability_print_css.type='text/css';document.getElementsByTagName('head')[0].appendChild(_readability_print_css);})();
Tidyread:

Code: Select all

javascript:(function(){var s=document.createElement(%22script%22);s.charset=%22UTF-8%22;s.language=%22javascript%22;s.type=%22text/javascript%22;s.src=%22http://www.tidyread.com/tidyread.js?u=%22+encodeURIComponent(document.location.href)+%22&t=%22+encodeURIComponent(document.title);document.body.appendChild(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.8.1.22) Gecko/20090605 SeaMonkey/1.1.17
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Feature request:booklet script allow

Post by Giorgio Maone »

The latest reported issue is about Firefox 3.5 breaking (again) NoScript's bookmarklet emulation code.
It's fixed in 1.9.4 RC1.

therube wrote: Now just what is a "trusted imported script"?
It depends on the value of the bookmarklets.import about:config preference:
  • 0 - no script gets imported during bookmarklet emulated execution
  • 1 - scripts from trusted (whitelisted sites) get imported (default)
  • 2 - any script added by the bookmarklet gets imported
therube wrote: And is it trusted where? Only in the context of the bookmarklet itself?
It's easier to say "when": during bookmarklet execution, in the page where the bookmarklet runs.
therube wrote: Does this apply for both bookmarklets & the equivalent extension (if one exists)?
Bookmarklets only.
therube wrote: Is the URL reference to the external website in the bookmarklet that would not work prior, but (theoretically) is working now?
Yes.
therube wrote: Why does the facebook bookmarklet work (at least I do get a popup dialog), where Readability & Tidyread bookmarklets appear not to?
Because you keep using Gecko 1.8 :P
All the recent bookmarklet enhancements are for 1.9 and above.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729)
Lam
Posts: 3
Joined: Fri Jun 12, 2009 3:26 pm

Re: Feature request:booklet script allow

Post by Lam »

Alan, Giorgio: Thank you for your replies, the 1.9.4 RC1 solved the problem!
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1b99) Gecko/20090605 Firefox/3.5b99
cewood
Posts: 3
Joined: Wed Jun 17, 2009 10:56 am

Re: Feature request:booklet script allow

Post by cewood »

I am currently using 1.9.4.3 and using a normal bookmarklet or via a ubiquity script neither is being allowed.

Is anyone else experiencing this behavior?


Application: Firefox 3.5b99 (20090605162636)
Operating System: WINNT (x86-msvc)

- NoScript 1.9.4.3
- Ubiquity 0.1.8
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1b99) Gecko/20090605 Firefox/3.5b99 (.NET CLR 3.5.30729)
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Feature request:booklet script allow

Post by therube »

NoScript Options | Advanced | Untrusted (tab) -> Forbid bookmarklets, deselected?
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.8.1.22) Gecko/20090605 SeaMonkey/1.1.17
User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3369
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Re: Feature request:booklet script allow

Post by GµårÐïåñ »

If the site is allowed (whitelisted) then the forbid bookmarklet on untrusted tab is moot and no longer asserted. Its not really asserted on untrusted sites either but provides error control.
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11
cewood
Posts: 3
Joined: Wed Jun 17, 2009 10:56 am

Re: Feature request:booklet script allow

Post by cewood »

I should have included that I had checked my options.

therube wrote:NoScript Options | Advanced | Untrusted (tab) -> Forbid bookmarklets, deselected?
Yes; I have this option deselected/disabled

GµårÐïåñ wrote:If the site is allowed (whitelisted) then the forbid bookmarklet on untrusted tab is moot and no longer asserted. Its not really asserted on untrusted sites either but provides error control.
I have to disagree with that last part. If the site is allowed (whitelisted) bookmarklets work fine, however if the site is untrusted then no joy, and this behaviour is repeatable every time.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1) Gecko/20090615 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: Feature request:booklet script allow

Post by Giorgio Maone »

cewood wrote:I have to disagree with that last part. If the site is allowed (whitelisted) bookmarklets work fine, however if the site is untrusted then no joy, and this behaviour is repeatable every time.
Does it happen with every bookmarklet or a specific bookmarklet?
Could you show me one bookmarklet which fails to work?
(For the Ubiquity issue I'm afraid you should ask Ubiquity developers, since they are Mozilla Corp employees and should know how to make a script work on a script-forbidden page, if necessary and safe).
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729)
cewood
Posts: 3
Joined: Wed Jun 17, 2009 10:56 am

Re: Feature request:booklet script allow

Post by cewood »

Giorgio Maone wrote: Does it happen with every bookmarklet or a specific bookmarklet?
Could you show me one bookmarklet which fails to work?
(For the Ubiquity issue I'm afraid you should ask Ubiquity developers, since they are Mozilla Corp employees and should know how to make a script work on a script-forbidden page, if necessary and safe).
It happens with all bookmarklets. I should note that using the NoScript Dev build on a 2.5.x install of Firefox works as expected, so I suspect this might be an issue with Firefox 3.5 again.


Two examples of bookmarklets which work if allowed, but are failing to work otherwise, are...

Code: Select all

javascript:%20var%20u%20=%20window.location.href;%20u%20=%20'http://digg.com/'%20+%20escape(u);%20window.location%20=%20u;

Code: Select all

javascript:(function(){var%20w=window;var%20d=document;var%20g=w.open('https://www.google.com/contacts/ui/ContactManager','gcontactsWin','location=no,menubar=no,scrollbars=no,status=no,toolbar=no,width=600,height=500,resizable');}).call({});";
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1) Gecko/20090615 Firefox/3.5 (.NET CLR 3.5.30729)
User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3369
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Re: Feature request:booklet script allow

Post by GµårÐïåñ »

You may disagree but the stated "technical" insight is correct. Try asking Giorgio why we don't have forbid bookmarklets for trusted sites too and maybe his response would clear it up for you what I meant.
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11
Post Reply