flyink13 / X Scroll YouTube Video

// ==UserScript==
// @name         X Scroll YouTube Video
// @namespace    http://tampermonkey.net/
// @version      0.5
// @author       Flyink13
// @match        https://www.youtube.com/*
// @updateURL https://openuserjs.org/meta/flyink13/X_Scroll_YouTube_Video.meta.js
// @downloadURL https://openuserjs.org/install/flyink13/X_Scroll_YouTube_Video.user.js
// @copyright 2017, flyink13 (https://openuserjs.org/users/flyink13)
// @license MIT
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    window.addEventListener("wheel", function(event){
        var player = document.querySelector(".html5-main-video");
        if(event.target !== player) return;
        if(!player || event.deltaY) return;
        if(event.deltaX) player.currentTime -= event.deltaX / (event.shiftKey ? 0.10 : 5);
        event.preventDefault();
        return false;
    });
})();