Restore poa.st video-audio controls

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

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

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