Greasy Fork

Greasy Fork is available in English.

YouTube Multi Downloader v3.5 (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-16 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name YouTube Multi Downloader v3.5 (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 http://greasyfork.icu/
// @homepageURL http://greasyfork.icu/scripts/34613
// @supportURL http://greasyfork.icu/scripts/34613/feedback
// @author Punisher
// @version 3.5
// @date 2018-09-16
// @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 *://*.youtube.com/*
// ==/UserScript==

(function() {
    if (document.getElementById("polymer-app") || document.getElementById("masthead") || window.Polymer) {
    setInterval(function() {
        if (window.location.href.indexOf("watch?v=") < 0) {
            return false;
        }  
        if (document.getElementById("meta-contents") && document.getElementById("punisher") === null) {
            Addytpolymer();
        }
    }, 100);

} else {
    
    setInterval(function() {
        if (window.location.href.indexOf("watch?v=") < 0) {
            return false;
        }      
        if (document.getElementById("watch8-sentiment-actions") && document.getElementById("punisher") === null) {
            AddhtmlDV();
        }
    }, 100);
}

function AddhtmlDV() {
    if (document.getElementById("watch8-sentiment-actions")) {
        var wrap = document.getElementById('watch8-sentiment-actions');
        var button = "<div id='punisher' style='display: inline-block; margin-left: 10px; vertical-align: middle;'>";
        button += "<a href=\"http://saveclipbro.com/convert?main_search%5BlinkToDownload%5D=" + encodeURIComponent(document.URL) + '&main_search%5Bsubmit%5D=' + "\" title=\"Download\" target=\"_blank\"" + "style=\"display: inline-block; font-size: inherit; height: inherit; border: 1px solid rgb(112, 112, 112); border-radius: 3px; padding-left: 28px; cursor: pointer; vertical-align: middle; position: relative; line-height: 22px; text-decoration: none; z-index: 1; color: rgb(255, 255, 255);\">";
        button += "<i style=\"position: absolute; display: inline-block; left: 6px; top: 3px; background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6Y2M9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL25zIyIgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIiB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiB2aWV3Qm94PSIwIDAgMTYgMTYiIGlkPSJzdmcyIiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBkPSJNIDQsMCA0LDggMCw4IDgsMTYgMTYsOCAxMiw4IDEyLDAgNCwwIHoiIGZpbGw9IiNmZmZmZmYiIC8+PC9zdmc+); background-size: 12px; background-repeat: no-repeat; background-position: center center; width: 16px; height: 16px;\"></i>";
        button += "<span style=\"padding-right: 12px;\">Download</span></a></div>";
        var style = "<style>#punisher button: -moz-focus-inner {padding: 0; margin:0} #punisher a {background-color: #3a3a3a} #punisher a:hover {background-color: #2b2b2b} #punisher a:active {background-color: #2b2b2b}</style>";
        var tmp = wrap.innerHTML;
        wrap.innerHTML = tmp + button + style;
    }
}

function Addytpolymer() {
    var buttonDiv = document.createElement("span");
    buttonDiv.style.width = "170%";
    buttonDiv.id = "punisher";
    var addButton = document.createElement("a");
    addButton.appendChild(document.createTextNode("DOWNLOAD"));
    addButton.style.width = "170px";
    addButton.style.position = "relative";
    addButton.style.letterSpacing = "0.007px";
    addButton.style.boxSizing = "border-box";
    addButton.style.minWidth = "5.14em";
    addButton.style.height = "inherit";
    addButton.style.backgroundColor = "#3a3a3a";
    addButton.style.color = "#ffffff";
    addButton.style.cursor = "pointer";
    addButton.style.padding = "10px 16px";
    addButton.style.marginTop = "5px";
    addButton.style.margin = "0px 3px";
    addButton.style.border = "0";
    addButton.style.borderRadius = "2px";
    addButton.style.fontFamily = "inherit";
    addButton.style.fontStyle = "inherit";
    addButton.style.fontSize = "1.4rem";
    addButton.style.textAlign = "center";
    addButton.style.textTransform = "uppercase";
    addButton.style.textDecoration = "none";
    addButton.href = "http://saveclipbro.com/convert?main_search%5BlinkToDownload%5D=" + encodeURIComponent(document.URL) + '&main_search%5Bsubmit%5D=';
    addButton.target = "_blank";
    buttonDiv.appendChild(addButton);
    
    if (document.getElementById("meta-contents")){
        if(document.getElementById('meta-contents').querySelector('#top-row ytd-video-owner-renderer.ytd-video-secondary-info-renderer #sponsor-button ytd-button-renderer paper-button')){
         var targetElement = document.querySelectorAll("[id='count']");
         for (var i = 0; i < targetElement.length; i++) {
         if (targetElement[i].className.indexOf("ytd-video-primary-info-renderer") > -1) {
            targetElement[i].appendChild(buttonDiv);
           }
          }
        }
        else{
        var wrap = document.getElementById('meta-contents').querySelector('#top-row ytd-video-owner-renderer.ytd-video-secondary-info-renderer #sponsor-button');
         wrap.appendChild(buttonDiv);
        }
    }
}
})();