Restore poa.st video-audio controls

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

Pada tanggal 12 Juni 2023. Lihat %(latest_version_link).

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         Restore poa.st video-audio controls
// @namespace    http://tampermonkey.net/
// @version      0.1
// @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
//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);