Twitch Player Plus

Various tweaks to the Twitch HTML5 player UI

Από την 03/10/2015. Δείτε την τελευταία έκδοση.

// ==UserScript==
// @name       Twitch Player Plus
// @namespace  http://ehsankia.com
// @version    0.1
// @description  Various tweaks to the Twitch HTML5 player UI
// @match      http://www.twitch.tv/**
// @copyright  2015+, Ehsan Kia
// ==/UserScript==

var id = setInterval(function() {
    var html5Player = $('div.player');
    if (html5Player.length > 0) {
        setTimeout(applyFixes, 3000);
        clearInterval(id);
    }
}, 1000);

function applyFixes() {
    // Sticky volume slider
    $('.js-volume-container').css('width', '13em');

    // Move quality option to main bar
    $(".js-quality").insertAfter($('.js-quality-display-contain'));
    $(".js-quality").css({float: "left", margin: "5px"});
    
    document.addEventListener("keypress", function(e){
        if(e.which === 102) {
            // enterFS($('div.player')[0]);
        }
    });
}

function enterFS(elem) {
    if (elem.requestFullscreen) {
        elem.requestFullscreen();
    } else if (elem.msRequestFullscreen) {
        elem.msRequestFullscreen();
    } else if (elem.mozRequestFullScreen) {
        elem.mozRequestFullScreen();
    } else if (elem.webkitRequestFullscreen) {
        elem.webkitRequestFullscreen();
    }
}
长期地址
遇到问题?请前往 GitHub 提 Issues,或加Q群1031348184

赞助商

Fishcpy

广告

Rainyun

注册一下就行

Rainyun

一年攒够 12 元