Skip to content

Instantly share code, notes, and snippets.

@justdanpo
Last active August 3, 2016 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justdanpo/7b50118129cdfa660d6ed9ce0c29e379 to your computer and use it in GitHub Desktop.
Save justdanpo/7b50118129cdfa660d6ed9ce0c29e379 to your computer and use it in GitHub Desktop.
Disable middle-click autoscrolling
// ==UserScript==
// @name Disable middle-click autoscrolling
// @description Disable middle-click autoscrolling
// @author ?
// @match http://*/*
// @match https://*/*
// @run-at document-start
// ==/UserScript==
(function() {
window.addEventListener('mousedown', function(evt) {
if (evt.button == 1) {
evt.preventDefault();
evt.stopPropagation();
}
}, true);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment