DTF comments panel scrolling (for DTF CSS theme)

Делает возможным скролл мышью в панели комментариев, если скроллбар включён.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         DTF comments panel scrolling (for DTF CSS theme)
// @namespace    https://github.com/TentacleTenticals/DTF-CSS-Dark-theme
// @version      1.0
// @description  Делает возможным скролл мышью в панели комментариев, если скроллбар включён.
// @author       Tentacle Tenticals
// @match        https://dtf.ru/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=dtf.ru
// @grant        none
// @license MIT
// ==/UserScript==
/* jshint esversion:8 */

(function() {
    'use strict';

window.addEventListener('wheel', commentScroll, true);
function commentScroll(e){
    //console.log(e.composedPath())
    if(e.composedPath().includes(document.querySelector(`.layout__right-column > div > div > div+div > div`))){
        if(e.deltaY >= 100){
            document.querySelector(`.layout__right-column > div > div > div+div > div`).scrollTop += 100
        }else
        if(e.deltaY <= -100){
            document.querySelector(`.layout__right-column > div > div > div+div > div`).scrollTop -= 100
        }
    }
}

})();