Page 1 of 1

Enhancement: Allow javascript within Bookmarks

Posted: Fri Jan 14, 2011 6:58 pm
by anonymouse
With Firefox, you can have a bookmark open into a new windows by
changing it propeties:

For Example, to have the bookmark for:
http://slashdot.org/

Always open in a new window, change its bookmark property to:

javascript:void(window.open('http://slashdot.org/'));

Now a single left click with your bookmarks on Slashdot
will open http://slashdot.org/ in a new window.

NoScript will correctly open the bookmark into a new window
if scripting is allowed on the currently displayed page.
If scripting is not allowed, clicking on the bookmark is ignored.

Is there a way for NoScript to consistently ignore or allow
javascript:void(window.open()) in bookmarks irregardless of
what page is currently displayed in the browser.

I can explain more if needed.

PS - Ii has been suggested that Firefox allow the user make
"open bookmarks in a new window" the default. But so far
the suggestion has been ignored/rejected.

Re: Enhancement: Allow javascript within Bookmarks

Posted: Fri Jan 14, 2011 7:48 pm
by therube
Seems to always be opening in a new window for me regardless of NoScript settings?

---

Now I did notice that if you have Allow sites opened through bookmarks enabled, then a bookmarked "site" such as javascript:void(window.open('http://slashdot.org/')); does not get Allowed. Though I guess that is to be expected.

Re: Enhancement: Allow javascript within Bookmarks

Posted: Wed Jan 26, 2011 5:49 am
by ammdispose
I am having similar problem.. but my javascript is slightly complex.

This script was working till yesterday but NOT after I upgraded to latest version. I also have noscript.allowURLBarJS set to true in config. So no idea what has changed in noscript.

Its a simple form creation and submit which searches for a train schedule.

Note: Code modified slightly for clarity (its actually 1 single line)
javascript: \
document.write(%22<form%20name=f%20action='http://www.indianrail.gov.in/cgi_bin/in ... ethod=post> \
<input%20type=hidden%20name=lccp_trnname%20value=%s> \
<input%20type=submit%20value=Submit></form>\n%22); \
document.f.submit(); \
document.close();
Strange thing is that Javascript runs (because I can see the submit button and view source also shows it full) but form is not getting submitted (even if I press submit button manually)

page about:blank is allowed by noscript

so please let me know of workaround to this.

thank you.

Re: Enhancement: Allow javascript within Bookmarks

Posted: Wed Jan 26, 2011 8:24 am
by Giorgio Maone