Add Video Controls for 9gag.com on hover

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

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==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;
  }; 
};