Created
May 13, 2018 07:34
-
-
Save x-magic/8cffe1ee7887ed02b25d70d6095c7056 to your computer and use it in GitHub Desktop.
This extension disables the annoying zoom shortcut Ctrl + Mousewheel.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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