Skip to content

Instantly share code, notes, and snippets.

View Svenskunganka's full-sized avatar
💭
I may be slow to respond.

Sven Svenskunganka

💭
I may be slow to respond.
  • Sweden
View GitHub Profile
@Svenskunganka
Svenskunganka / inject.js
Last active August 1, 2017 00:40
Prevent scroll jacking with this ugly one-liner
["DOMMouseScroll", "mousewheel", "scroll"].forEach(((listeners, eventName) => { if (eventName in listeners) listeners[eventName].forEach((event) => window.removeEventListener(eventName, event.listener))}).bind(null, getEventListeners(window)))