Youtube true 720p player

Title of the video is a link to a webpage containing 1280x720px youtube player.

当前为 2015-06-24 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

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

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name Youtube true 720p player
// @description Title of the video is a link to a webpage containing 1280x720px youtube player.
// @author Jan harvalík [email protected]
// @version 1.1
// @date 2015-06-22
// @include http://www.youtube.com/*
// @include https://www.youtube.com/*
// @exclude http://www.youtube.com/embed/*
// @exclude https://www.youtube.com/embed/*
// @grant GM_xmlhttpRequest
// @grant GM_getValue
// @grant GM_setValue
// @run-at document-end
// @license     MIT License
// @namespace https://greasyfork.org/users/12627
// ==/UserScript==


	var title=document.getElementById('eow-title');

	title.style.color="red";
	title.style.cursor="pointer";

	var text=title.innerHTML;
	title.innerHTML =  "►"+ text;

	

	// Copis the video code from URL, parameter v.
	var v = location.search.split('v=')[1];

	title.onclick=function(){

		var pauseButton = document.querySelector('.ytp-button-pause');
		if (typeof(pauseButton) !== 'undefined' && pauseButton !== null){

			pauseButton.click();
		}

		/*
		The "player" can't be file inside the computer (security), so google drive is used as server ( https://support.google.com/drive/answer/2881970?hl=en )
		URL of the file is http://www.googledrive.com/host/0B-gs6HL8vtTZeXd3bHhqZmIwWjg/ parameter v is used in the same fashion as on youtube
		*/
		window.open("http://www.googledrive.com/host/0B-gs6HL8vtTZeXd3bHhqZmIwWjg/?v="+v,"_blank");
	};