Vertical Stream Magic

Adjust Twitch streams for a vertical orientated monitor.

Versione datata 12/12/2016. Vedi la nuova versione l'ultima versione.

// ==UserScript==
// @name          Vertical Stream Magic
// @namespace     http://greasyfork.dpdns.org/users/2240-doodles
// @author        Doodles
// @version       1
// @description   Adjust Twitch streams for a vertical orientated monitor.
// @include       *://www.twitch.tv/*
// @exclude       *://www.twitch.tv/*/*
// @exclude       *://www.twitch.tv/settings
// @require       https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js
// @updateVersion 1
// ==/UserScript==

this.$ = this.jQuery = jQuery.noConflict(true);
$(document).ready(function () {
	'use strict';
	if($("meta[property='og:video']").length !== 0 && $("meta[property='og:video']").attr("content").indexOf("channel=") != -1){
		var channelName = document.URL.split("twitch.tv/")[1].split("&")[0].split("#")[0];
		$('script').each(function () { $(this).remove(); });
		$('body').html('' + 
			'<iframe src="https://player.twitch.tv/?channel='+channelName+'" id="stream" height="603" width="1072" frameborder="0" scrolling="no" allowfullscreen="true"></iframe>' + 
			'<iframe src="https://www.twitch.tv/'+channelName+'/chat?popout=" id="chat" height="633" width="1072" frameborder="0" scrolling="no" allowfullscreen="true"></iframe>' + 
		'');
		$('head').html('<title>'+channelName+'</title>');
		$('body').css({'background-color': '#ffe', 'padding': '0 0 0 0' , 'margin': '0 0 0 0' });
		$('iframe').css({'padding': '0 0 0 0' , 'margin': '0 0 0 0', 'display' : 'block' });
	}
});
长期地址
遇到问题?请前往 GitHub 提 Issues,或加Q群1031348184

赞助商

Fishcpy

广告

Rainyun

注册一下就行

Rainyun

一年攒够 12 元