| // ==UserScript== | |
| // @name Disable Google Maps scroll zoom in Google Chrome | |
| // @namespace http://henrik.nyh.se | |
| // @description Disables Google Maps scroll zoom because it's unusable with Apple's Magic Mouse. Confirmed to work in Google Chrome. | |
| // @include http://maps.google.com/* | |
| // ==/UserScript== | |
| // Adapted from the Safari extension by Mario Tausch/Tiago Rodrigues (https://public.me.com/ix/mariotausch/dev/index.html) | |
| // via http://www.leancrew.com/all-this/2011/05/the-google-maps-scrollzoom-confusion/. | |
| var noop = function(e) { | |
| e.preventDefault(); | |
| e.stopPropagation(); | |
| return false; | |
| }; | |
| var children = document.getElementById("map").childNodes; | |
| for (var i=0, l=children.length; i<l; i++) { | |
| children[i].addEventListener("mousewheel", noop, false); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment