// ==UserScript== // @name Fastest Youtube Downloader! // @namespace https://dunkoyun.com // @version 4 // @description The fastest and best quality video and music (mp3) download plug-in from YouTube! // @author Onur YASAR // @include http*://*.youtube.com/* // @include http*://youtube.com/* // @include http*://*.youtu.be/* // @include http*://youtu.be/* // @run-at document-end // @downloadURL none // ==/UserScript== function go() { start(); } window.addEventListener('spfdone', go, false); window.addEventListener('DOMContentLoaded', go, false); window.addEventListener('yt-navigate-finish', go, false); function start() { function isMaterial() { var temp; temp = document.querySelector("ytd-app, [src*='polymer'],link[href*='polymer']"); if (!temp) { // old UI var terp = document.querySelector("#indirtici"); if(!terp){ temp = document.createElement("template"); temp.innerHTML = // `
WARNING : Simple Youtube Downloader is Only compatible with the new YouTube Material Layout
Click here to activate the new YouTube Material Layout.


[X] CLOSE
`; document.documentElement.appendChild(temp.content.firstChild); document.documentElement.removeAttribute("data-user_settings"); return true; } } } isMaterial(); var lasturl = ""; function check() { if (location.href == lasturl) return; lasturl = location.href; if (lasturl.indexOf("watch?v=")) removeframe(); } setInterval(check, 1000); bvd2_btn_onclick = function() { var url = window.location.href; var myHosts = ['http://youdl1.byethost17.com/', 'http://youdl2.byethost8.com/', 'http://youdl3.byethost15.com/']; var randHost = myHosts[Math.floor(Math.random() * myHosts.length)]; window.open(randHost+"api.php?y="+url, "_blank", "toolbar=no,scrollbars=no,resizable=no,top=200,left=200,width=600,height=330"); }; getSpan = function(text, className) { var _tn = document.createTextNode(text); var span = document.createElement("span"); span.className = className; span.appendChild(_tn); return span; }; createButton = function() { var obj = document.querySelector('#top-row>#subscribe-button'); if (obj !== null) { // check if the button has already been created var btnRow = document.getElementById('bestvd2'); if (btnRow === null) { var bestvd2 = document.createElement("div"); bestvd2.id = "bestvd2"; bestvd2.className = "style-scope"; var bvd2_btn = document.createElement("div"); bvd2_btn.className = "style-scope bvd2_btn"; bvd2_btn.style = "background-color: green; border: solid 2px green; border-radius: 2px; color: white; padding: 0px 15px; font-size: 14px; cursor:pointer; height:33px;margin-right: 7px;margin-top: 7px;line-height: 33px;font-weight: 500; display:inline-block;"; bvd2_btn.appendChild(getSpan("Open Download Screen", "")); bvd2_btn.onclick = bvd2_btn_onclick; obj.parentNode.insertBefore(bestvd2, obj); bestvd2.appendChild(bvd2_btn); } } }; var intervalCheck = setInterval(function() { createButton(); }, 250); }