Restore poa.st video-audio controls

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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