Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a GreaseMonkey script to disable the JavaScript-disabling of copy-paste in Firefox (3.0)? Or should I just run NoScript or some other extension on any site that attempts this (other things might break...)?

[rant] Absolutely the worst "clever" use of JavaScript. Fortunately Safari is more usable and ignores the JavaScript hack that disables copy-paste. Who at Mozilla thought that was acceptable whatsoever? For shame. By the way, which browser added this "feature" first, IE? [/rant]

share|improve this question
you better not be copying and pasting any of this content, mister! – Jeff Atwood Aug 14 '09 at 23:58
Sadly the people who do this probably don't have content anyone would want to steal any way. – Jared Updike Aug 15 '09 at 0:07
If it's pictures you're trying to copy, a nice print screen does the job. Sometimes, I'll copy a web page window to clipboard, crop the image I want in Photoshop, and then email it to the webmaster =D. For text, though, I guess you might need something else. – oscilatingcretin Aug 18 '11 at 18:55

6 Answers 6

up vote 3 down vote accepted

The Anti-Disabler script on works if you replace document. with document.wrappedJSObject.

Link appears to be dead now, here's a wayback link:

and here's the script:

// Anti-Disabler
// version 0.5 BETA!
// 2005-06-28
// Copyright (c) 2005, Mark Pilgrim
// Released under the GPL license
// --------------------------------------------------------------------
// This is a Greasemonkey user script.
// To install, you need Greasemonkey:
// Then restart Firefox and revisit this script.
// Under Tools, there will be a new menu item to "Install User Script".
// Accept the default configuration and install.
// To uninstall, go to Tools/Manage User Scripts,
// select "Anti-Disabler", and click Uninstall.
// --------------------------------------------------------------------
// ==UserScript==
// @name          Anti-Disabler
// @namespace
// @description   restore context menus on sites that try to disable them
// @include       *
// @exclude*
// @exclude*
// ==/UserScript==

(function() {
    var e, i, all;

    document.onmouseup = null;
    document.onmousedown = null;
    document.oncontextmenu = null;

    all = document.getElementsByTagName("*");
    for (i = 0; i < all.length; i += 1) {
        e = all[i];
        e.onmouseup = null;
        e.onmousedown = null;
        e.oncontextmenu = null;

// ChangeLog
// 2005-06-28 - 0.5 - MAP - updated GMail URL
// 2005-04-21 - 0.4 - MAP - linted
// 2005-04-21 - 0.3 - MAP - exclude GMail
// 2005-04-18 - 0.2 - MAP - tidy code
// 2005-04-01 - 0.1 - MAP - initial release
share|improve this answer
And that's why I hate link-only-answers... your link is dead! – Burkhard Mar 11 at 11:18
@Burkhard Fixed – Sam Hasler Mar 11 at 11:31
Thank you. Now it will be preserved for all :-) – Burkhard Mar 11 at 12:18

Just disable the following option in Firefox's Javascript settings (it won't disable the warnings, as they are Javascript messages, but the context menu cannot be disabled by the web pages anymore):

enter image description here

share|improve this answer
There are some web-app sites where I want to have the their custom context menus. It's annoying to have to turn this on and off. A per-site way of blacklisting sites is needed. – Sam Hasler Aug 15 '09 at 13:40

I don't often toot my own horn. I actually was searching if anyone had a better method than my script:

Ultimately, I'd like there be an option within the browser that blocks javascript entries to onpaste events.

share|improve this answer

You may want to go to about:config and set dom.event.clipboardevents.enabled to false. This stopped the problems I was having with pages interfering with my clipboard.

share|improve this answer

Haven't tried it:

Taking Back the Browser: Re-enable Context Menus on Sites That Disable Them

but it's a possible lead.

share|improve this answer
The Greasemonkey script on that page didn't work on the one site I tried it on. – Sam Hasler Aug 15 '09 at 13:38
To be specific, it won't defeat the script on this page: – Sam Hasler Aug 15 '09 at 14:02

How about the good-old NoScript option with firefox?
I tried the site on the your answer and was allowed to right-click and save.
Then, I opened javascript block for the site and was blocked right-click!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.