Skip to content

Instantly share code, notes, and snippets.

@x-magic
Created May 13, 2018 07:34
Show Gist options
  • Save x-magic/8cffe1ee7887ed02b25d70d6095c7056 to your computer and use it in GitHub Desktop.
Save x-magic/8cffe1ee7887ed02b25d70d6095c7056 to your computer and use it in GitHub Desktop.
This extension disables the annoying zoom shortcut Ctrl + Mousewheel.
// ==UserScript==
// @name NoMouseWheelZoom
// @namespace https://github.com/rashid301/NoMouseWheelZoom
// @version V2 without jQuery
// @description This extension disables the annoying zoom shortcut Ctrl + Mousewheel.
// @author Github@rashid301 (Original author, being ported from a Chrome extension)
// @include *://*/*
// @run-at document-start
// @updateURL https://gist.githubusercontent.com/x-magic/8cffe1ee7887ed02b25d70d6095c7056/raw/NoMouseWheelZoom.user.js
// @downloadURL https://gist.githubusercontent.com/x-magic/8cffe1ee7887ed02b25d70d6095c7056/raw/NoMouseWheelZoom.user.js
// ==/UserScript==
(function() {
'use strict';
function mousewheelfn(e) {
if(e.ctrlKey) {
e.preventDefault();
e.stopPropagation();
}
}
window.onmousewheel = document.onmousewheel = mousewheelfn;
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment