How can I stop JavaScript from modifying the clipboard?

Solution 1:

To disable this behavior in Firefox:

  1. In the URL bar, type: about:config
  2. Press Enter
  3. In the search box, type: dom.event.clipboardevents.enabled
  4. Double-click it to toggle its value to false.

Solution 2:

It turns out this JavaScript code is being served by a "service" called tynt.com. Redirecting tcr.tynt.com to 127.0.0.1 in my hosts file solved the problem for me. From what I read elsewhere, there may be multiple servers that need to be blocked. Adblock list subscriptions may also take care of the problem, and you may be able to set up a filter in your ad blocking software to correct it.

What I would really like would be a flag in about:config to remove permission for JavaScript to modify the clipboard.