Greasy Fork is available in English.

Stop Middle Click Hijacking

Prevent sites from hijacking the middle mouse button for their own purposes

  1. // ==UserScript==
  2. // @name Stop Middle Click Hijacking
  3. // @description Prevent sites from hijacking the middle mouse button for their own purposes
  4. // @icon http://www.rjlsoftware.com/software/entertainment/finger/icons/finger.gif
  5. // @version 0.1
  6. // @license GNU General Public License v3
  7. // @copyright 2014, Nickel
  8. // @grant none
  9. // @include *://www.youtube.com/*
  10. // @namespace https://greasyfork.org/users/10797
  11. // ==/UserScript==
  12.  
  13. (function(){
  14. //Adapted from Chrome extension (written by petergrabs@yahoo.com)
  15. //TODO: would event.preventDefault() also work??
  16.  
  17. document.addEventListener("click", function(e){ e.button===1 && e.stopPropagation(); }, true);
  18. })();