Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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