// ==UserScript== // @name YouTube Multi Downloader v5.1 - Converter.TUBE (MP3, FHD, MKV, MP4, AAC, M4A, F4V, 3GP, etc) // @description Compatible with YouTube MP3 Downloader! No ads, this script helps to add a download button. Converter.TUBE features the fastest ways to download YouTube videos and audios, ensuring quality. // @namespace https://greasyfork.org/users/152924 // @homepageURL https://greasyfork.org/scripts/34613 // @supportURL https://greasyfork.org/scripts/34613/feedback // @author Punisher // @version 5.1 // @date 2019-10-19 // @icon https://i.imgur.com/InuDDVK.png // @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/* // @downloadURL none // ==/UserScript== (function() { if (document.getElementById("polymerz-app") || document.getElementById("masthead") || window.Polymerz) { setInterval(function() { if (window.location.href.indexOf("watch?v=") < 0) { return false; } if (document.getElementById("meta-contents") && document.getElementById("punisherz") === null) { Addytpolymerz(); } }, 100); setElement = function(url) { var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/; var match = String(url).match(regExp); return (match&&match[7].length==11)? match[7]: false; }; } else { setInterval(function() { if (window.location.href.indexOf("watch?v=") < 0) { return false; } if (document.getElementById("watch8-sentiment-actions") && document.getElementById("punisherz") === null) { AddhtmlDV(); } }, 100); setElement = function(url) { var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/; var match = String(url).match(regExp); return (match&&match[7].length==11)? match[7]: false; }; } function AddhtmlDV() { if (document.getElementById("watch8-sentiment-actions")) { var wrap = document.getElementById('watch8-sentiment-actions'); var button = "
"; button += ""; button += ""; button += "Download
"; var style = ""; var tmp = wrap.innerHTML; wrap.innerHTML = tmp + button + style; } } function Addytpolymerz() { var buttonDiv = document.createElement("span"); buttonDiv.id = "punisherz"; buttonDiv.style.width = "100%"; buttonDiv.style.marginTop = "3px"; buttonDiv.style.padding = "12px 0"; var addButton = document.createElement("a"); addButton.appendChild(document.createTextNode("DOWNLOAD")); addButton.style.width = "100%"; addButton.style.cursor = "pointer"; addButton.style.height = "inherit"; addButton.style.backgroundColor = "#141111"; addButton.style.color = "#ffffff"; addButton.style.padding = "10px 22px"; addButton.style.margin = "0px 0px"; addButton.style.border = "0"; addButton.style.borderRadius = "2px"; addButton.style.fontSize = "1.4rem"; addButton.style.fontFamily = "inherit"; addButton.style.textAlign = "center"; addButton.style.textDecoration = "none"; addButton.href = "//converter.tube/?vid=youtube/" + encodeURIComponent(setElement(window.location)); addButton.target = "_blank"; buttonDiv.appendChild(addButton); var targetElement = document.querySelectorAll("[id='subscribe-button']"); if(targetElement){ for(var i = 0; i < targetElement.length; i++){ if(targetElement[i].className.indexOf("ytd-video-secondary-info-renderer") > -1){ targetElement[i].appendChild(buttonDiv); } } } } })();