Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.