Last active
May 24, 2016 05:17
-
-
Save briancline/51981655a8a79dca88a02900490959fc to your computer and use it in GitHub Desktop.
Prevent brain-dead UI/UX terrorists from crapping on OS-native scrolling / touchpad behavior
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
/* | |
* Copied for updates/additions from this Chrome extension (highly recommended): | |
* "Smooth Scroll Sucks" (vong.io) | |
* https://chrome.google.com/webstore/detail/smooth-scroll-sucks/bpbeihnjhalcfmjbcdafhdmcedknoflm | |
* | |
* If you're a UX terrorist who thinks it's "super cool" or "totally sweet" to | |
* to hijack the scrollwheel/trackpad to make things horrifically slow: stop. | |
* Just stop it with that shit. This is not good behavior. Your site actually | |
* provides the perceived feedback of a pile of mayonnaise slowly sliding down | |
* the edge of the world's largest turd. | |
*/ | |
chrome.webRequest.onBeforeRequest.addListener( | |
function(info) { | |
return {redirectUrl: "javascript:"}; | |
}, | |
{ | |
urls: [ | |
"*://*/*scroll*.js*", | |
"*://*/*easing*.js*", | |
"*://*/*transit*.js*" | |
], | |
types: ["script"] | |
}, | |
["blocking"] | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment