您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Fixes the Twitch player by replacing it with the embeddable version. Kind of a bandaid solution.
// ==UserScript== // @name Twitch Bandaid // @namespace http://tampermonkey.net/ // @version 1.0.1 // @description Fixes the Twitch player by replacing it with the embeddable version. Kind of a bandaid solution. // @author Tantusar // @match www.twitch.tv/* // @match twitch.tv/* // @grant none // ==/UserScript== /* jshint -W097 */ 'use strict'; window.addEventListener("load", function() { var pathArray = window.location.pathname.split( '/' ); if (pathArray.length == 2) { var channel = pathArray[1]; var src = "<iframe src='http://player.twitch.tv/?playertype=site&channel=".concat(channel); var final = src.concat("' style='height:inherit; width:inherit'>"); var list = document.getElementsByClassName("dynamic-player"); for (var i = 0; i < list.length; i++) { list[i].innerHTML = final; } var listb = document.getElementsByClassName(" dynamic-player"); for (var j = 0; j < listb.length; j++) { listb[j].innerHTML = final; } } }, false);