Add Video Controls for 9gag.com on hover

Простой скрипт, добавляющий возможность контроллировать громкость видео на 9gag.com, дополнительно убавляющий ее на старте до 20%

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        Add Video Controls for 9gag.com on hover
// @namespace   Violentmonkey Scripts
// @match       https://9gag.com/*
// @match       https://9gag.com/gag/*
// @grant       none
// @version     1.0
// @author      DeathByte
// @description:en Simple script for adding control elements for videos on 9gag.com and reduce ears pain from sound volume, by setting it to 20 percent
// @description Простой скрипт, добавляющий возможность контроллировать громкость видео на 9gag.com, дополнительно убавляющий ее на старте до 20%
// ==/UserScript==

"use strict"

window.onmouseover = function(event){
  const element = event.target;
  if (element.tagName =="VIDEO" && element.hasAttribute("controls") == false) {
    element.setAttribute("controls","");
    element.nextSibling.style.display="none";
    element.volume=0.2;
  }; 
};