Download Youtube videos and subtitles

获取youtube视频和字幕的下载链接

Versión del día 12/06/2017. Echa un vistazo a la versión más reciente.

// ==UserScript==
// @name      Download Youtube videos and subtitles
// @namespace  https://www.findhao.net
// @version    0.2.3
// @description  获取youtube视频和字幕的下载链接
// @include http://www.youtube.com/*
// @include https://www.youtube.com/*
// @exclude http://www.youtube.com/embed/*
// @exclude https://www.youtube.com/embed/*
// @match http://www.youtube.com/*
// @match https://www.youtube.com/*
// @match http://s.ytimg.com/yts/jsbin/html5player*
// @match https://s.ytimg.com/yts/jsbin/html5player*
// @match http://manifest.googlevideo.com/*
// @match https://manifest.googlevideo.com/*
// @match http://*.googlevideo.com/videoplayback*
// @match https://*.googlevideo.com/videoplayback*
// @match http://*.youtube.com/videoplayback*
// @match https://*.youtube.com/videoplayback*
// @copyright  2017+, Find
// @author FindHao
// ==/UserScript==




var download=document.createElement("span");
download.setAttribute("calss", "yt-uix-button-subscription-container");
download.setAttribute("id", "findspace-downyoutube");
download.innerHTML='<button class="yt-uix-button yt-uix-button-size-default yt-uix-button-opacity " ><span class="yt-uix-button-content">获取下载链接(Get DownLoad Links)</span></button>';
download.addEventListener("click", function() {
	var id = Math.random();
    document.write('<form id="post' + id + '" name="post'+ id +'" action="http://www.findyoutube.net/" method="post">');
    document.write('<input type="hidden" name="url" value="'+window.location.href+'" /></form>');
    document.getElementById('post' + id).submit();
});
var beforeNode=document.getElementById("watch-like-dislike-buttons");
document.getElementById("watch8-secondary-actions").insertBefore(download,beforeNode);