Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@briancline
Last active May 24, 2016 05:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save briancline/51981655a8a79dca88a02900490959fc to your computer and use it in GitHub Desktop.
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
/*
* 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