MozillaZine

is there any way to disable javascript:window.print();

User Help for Mozilla Firefox
diesel_travis

User avatar
 
Posts: 133
Joined: September 16th, 2003, 11:31 pm
Location: Rochester, NY

Post Posted April 3rd, 2007, 11:23 am

I looked in the about:config, but i didn't see anything in there.
javascript:window.print(); can be such an annoying "feature", hopefully there's a way to disable it in Firefox - or if I could at least turn it off when it's used in an onload event.

Thanks,
Travis

the-edmeister

User avatar
 
Posts: 32221
Joined: February 25th, 2003, 12:51 am
Location: Chicago, IL, USA

Post Posted April 3rd, 2007, 11:30 am

Use NoScript to block JavaScript from that domain?


Ed
A mind is a terrible thing to waste. Mine has wandered off and I'm out looking for it.

diesel_travis

User avatar
 
Posts: 133
Joined: September 16th, 2003, 11:31 pm
Location: Rochester, NY

Post Posted April 3rd, 2007, 3:35 pm

That would work for one site, but I'd like to just ditch the feature altogether since I always click cancel. It really sucks when it happens in a new tab and takes over too.

Giorgio Maone

User avatar
 
Posts: 3516
Joined: September 21st, 2004, 12:05 am
Location: Palermo - Italy

Post Posted April 4th, 2007, 10:26 am

You can do this by adding the following line to your user preferences file (user.js):
Code: Select all
user_pref("capability.policy.default.Window.print", "noAccess");

diesel_travis

User avatar
 
Posts: 133
Joined: September 16th, 2003, 11:31 pm
Location: Rochester, NY

Post Posted April 4th, 2007, 10:34 am

That seems to do the trick, thanks!

diesel_travis

User avatar
 
Posts: 133
Joined: September 16th, 2003, 11:31 pm
Location: Rochester, NY

Post Posted April 4th, 2007, 12:22 pm

hmm, now whenever a link opens a new window I get this alert box:

TypeError: url has no properties

diesel_travis

User avatar
 
Posts: 133
Joined: September 16th, 2003, 11:31 pm
Location: Rochester, NY

Post Posted April 6th, 2007, 12:48 pm

is there a way to disable the Alert: "TypeError: url has no properties" message as well?

Return to Firefox Support


Who is online

Users browsing this forum: Google [Bot] and 9 guests