Greasy Fork is available in English.

HTML5 Steam Trailers

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

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

Advertisement:

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

Advertisement:

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         HTML5 Steam Trailers
// @namespace    http://pyroglyph.co.uk/
// @version      1.1
// @description  Replaces Steam's own video controls with dark HTML5 controls.
// @author       Pyroglyph
// @match        http://store.steampowered.com/*
// @grant        none
// ==/UserScript==

// Run on page load
(function() {
    'use strict';
    convertVideoToHTML5();
})();
// Also run on click because not all videos are visible on page load
onclick = function() { convertVideoToHTML5(); };

function convertVideoToHTML5() {
    // Can't find a better way to remove them ¯\_(ツ)_/¯
    var oldControls = document.querySelector('.html5_video_overlay');
    if (oldControls !== null && typeof oldControls !== 'undefined') {
        oldControls.parentNode.removeChild(oldControls);
    }

    var videos = document.getElementsByTagName('video');
    if (videos !== null && typeof videos !== 'undefined' && videos.length !== 0) {
        for (var i = 0; i < videos.length; i++) {
            videos[i].setAttributeNode(document.createAttribute('controls'));
        }
    }

    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);
}