YouTube Multi Downloader v3.3 (MP3, FHD, AVI, MP4, FLV, M4V, WKV, ACC, WOV, OGG, etc)

This script helps to add a download button. Saveclipbro.com features the fastest ways to download YouTube videos and audios, ensuring quality. Supported Services: YouTube, Dailymotion, Vimeo, Twitter, Vine, Facebook, Instagram, Xvideos, CNN, SoundCloud, Redtube, Freesound, Pornhub, Reddit, Liveleak and more than +1000 audio and video servers!

当前为 2018-09-10 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name YouTube Multi Downloader v3.3 (MP3, FHD, AVI, MP4, FLV, M4V, WKV, ACC, WOV, OGG, etc)
// @description This script helps to add a download button. Saveclipbro.com features the fastest ways to download YouTube videos and audios, ensuring quality. Supported Services: YouTube, Dailymotion, Vimeo, Twitter, Vine, Facebook, Instagram, Xvideos, CNN, SoundCloud, Redtube, Freesound, Pornhub, Reddit, Liveleak and more than +1000 audio and video servers!
// @namespace https://greasyfork.org/
// @homepageURL https://greasyfork.org/scripts/34613
// @supportURL https://greasyfork.org/scripts/34613/feedback
// @author Punisher
// @version 3.3
// @date 2018-09-10
// @compatible chrome
// @compatible firefox
// @compatible opera
// @compatible safari
// @license CC BY-NC-ND 4.0 International. https://creativecommons.org/licenses/by-nc-nd/4.0/
// @match *://www.youtube.com/*
// ==/UserScript==

if("undefined" == typeof (punisher)) {
	var punisher = {

        userUrl: 'http://saveclipbro.com/convert?main_search%5BlinkToDownload%5D=',
        currentMediaUrl: null,
		getParam : function (document, variable){
			 var query = document.location.search.substring(1);
			 var vars = query.split("&");
			  for (var i=0;i<vars.length;i++) {
					var pair = vars[i].split("=");
					if(pair[0] == variable){return pair[1];}
			   }       return(false);
		},

		init : function() {
			punisher.onPageLoad();		
		},

		addButtons: function(document) {
				var icon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAHdElNRQfiBgcWJSfQnWd+AAAA8klEQVQoz4XQvS6DcRQG8F8/SBEf0UR160J0MAkuwCAxsolRuADXYMF1WEQT6UDcgMkgEl9N2MSgvhLRhPf9G5rykiZ9znJyzpNznuehA1KJftSyHBp2PSQJaUsmPLq2bwiv5pwmr2QdCG4tqguCZ1O/y3QnDdm2035rCmr2RFkFw/rQpSgDggEbxh2piFhwoSH48iQSBC/W3QkOdTefbIqFREXqPluEjNiZSWPCTyYpPdK4dyKTwYcrsyqKBv9ILZp32TJb1mvVuyB4UxMEse2miha67YjFtky7ERwb+e8/r6oqjxXnZtpFVFICOeXOKYNvVG9Jr+BMPlYAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMDYtMDdUMjI6Mzc6MzktMDQ6MDAbP7BNAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTA2LTA3VDIyOjM3OjM5LTA0OjAwamII8QAAAABJRU5ErkJggg==';
				var punisherpather = punisher.userUrl + encodeURIComponent(document.URL) + '&main_search%5Bsubmit%5D=';
                var div_embed = null;
                var target = '_blank';
				if(document.getElementById('meta-contents')) {
                    var div_embed = document.getElementById('meta-contents').querySelector('#top-row ytd-video-owner-renderer.ytd-video-secondary-info-renderer #sponsor-button');
                    div_embed.innerHTML += '<paper-button subscribed id="punisher" style="float:right" raised class="ytd-subscribe-button-renderer"><a href="' + punisherpather + '" target="' + target + '" style="text-decoration: none; color: inherit;" class="style-scope ytd-subscribe-button-renderer"><img  style="vertical-align: bottom;" src="' + '"><strong>Download</strong></a></paper-button>'+ div_embed.innerHTML;                  
				} else if(document.getElementById('watch8-sentiment-actions')) {
					var div_embed = document.getElementById('watch8-sentiment-actions');
					var buttonclass = "yt-uix-button yt-uix-button-default yt-uix-tooltip";
					var spanclass = "yt-uix-button-group";
                    div_embed.innerHTML = '<span id="punisher" class="' + spanclass + '"><a href="' + punisherpather + '" target="' + target + '"><button class="start ' + buttonclass + '" type="button" title="Download"><img alt="" class="" style="" src="' + icon + '"> <span class="yt-uix-button-content"><strong>Download</strong></span></button></a>' + div_embed.innerHTML;
				}
		},

		onPageLoad : function() {
			if(document.body && document.domain == 'www.youtube.com') {
					setInterval(punisher.check, 0500);
                    punisher.check(false);
			}
		},

        check: function() {
            if(punisher.currentMediaUrl != document.URL  && typeof ytplayer != 'undefined' && ytplayer) {
                punisher.currentMediaUrl = document.URL;
                if(document.getElementById('punisher')) {
                    document.getElementById('punisher').outerHTML="";
                }
			}
            if(!document.getElementById('punisher') && typeof ytplayer != 'undefined' && ytplayer) {
                punisher.addButtons(document);
            }
        },
	};
}
punisher.init();