Restore poa.st video-audio controls

Restores default browser controls for audio/video elements for poa.st

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Restore poa.st video-audio controls
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  Restores default browser controls for audio/video elements for poa.st
// @author       kamehamic
// @match        https://poa.st/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=poa.st
// @grant        none
// @license GPLv2
// ==/UserScript==

//requires ublock origin (this script can probably be modified to do the ublock part... maybe in the future)
//lines for ublock (my filters section)
//poa.st##.active.video-player__controls
//poa.st##.audio-player__canvas

function func(){
    'use strict';
    var d = document.querySelectorAll("video:not([controls])");
    for (var i = 0; i < d.length; ++i)
    {
        //console.log(d[i].id);
        d[i].setAttribute("controls", "true");
    }
    var e = document.querySelectorAll("audio:not([controls])");
    for (var j = 0; j < e.length; ++j)
    {
        //console.log(e[j].id);
        e[j].setAttribute("controls", "true");
    }
}

setInterval(func, 2000);