HTML5 Steam Trailers

Replaces Steam's own video controls with dark HTML5 controls.

As of 18.06.2017. See ბოლო ვერსია.

// ==UserScript==
// @name         HTML5 Steam Trailers
// @namespace    http://pyroglyph.co.uk/
// @version      1.0
// @description  Replaces Steam's own video controls with dark HTML5 controls.
// @author       Pyroglyph
// @match        http://store.steampowered.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    var oldControls = document.querySelector(".html5_video_overlay");
    oldControls.style.visibility = "hidden";

    var video = document.getElementsByTagName("video")[0];
    var att = document.createAttribute("controls");
    video.setAttributeNode(att);

    var style = document.createElement("style");
    var node = document.createTextNode("video::-webkit-media-controls { filter: grayscale(1) brightness(0.9) invert(1); }");
    style.appendChild(node);
    document.head.appendChild(style);
})();