// ==UserScript== // @name Native Media Controls // @namespace NativeMediaControls // @match https://twitter.com/* // @version 1.0.2 // @author Rej // @license MIT // @description This script attempts to replace Twitter media controls with your browsers native media controls. // @icon data:image/svg+xml,%3Csvg xmlns="http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg" width="256" height="256" viewBox="0 0 256 256"%3E%3Cg fill="white"%3E%3Cpath d="M216 48H40a8 8 0 0 0-8 8v112a8 8 0 0 0 8 8h176a8 8 0 0 0 8-8V56a8 8 0 0 0-8-8Zm-104 96V80l48 32Z" opacity=".2"%2F%3E%3Cpath d="m164.44 105.34l-48-32A8 8 0 0 0 104 80v64a8 8 0 0 0 12.44 6.66l48-32a8 8 0 0 0 0-13.32ZM120 129.05V95l25.58 17ZM216 40H40a16 16 0 0 0-16 16v112a16 16 0 0 0 16 16h176a16 16 0 0 0 16-16V56a16 16 0 0 0-16-16Zm0 128H40V56h176v112Zm16 40a8 8 0 0 1-8 8H32a8 8 0 0 1 0-16h192a8 8 0 0 1 8 8Z"%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E // @downloadURL none // ==/UserScript== ! function (d) { var k = 0; function goagain() { for (let e of document.getElementsByTagName("video")) { e.setAttribute("controls", "controls"); let rmv = e.parentElement.parentElement.nextElementSibling; if (rmv) { rmv.remove(); } } k += 1; if (k < 1000) { setTimeout(() => { goagain(); }, 1000); } } goagain(); }(document);