YouTube™ MP3 Downloader v4.4 (Relaunched) 🚀💯 - YTMP3x.com (NO ADS & NEW LAYOUT FOR YT! 🚫🤩)

This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!

// ==UserScript==
// @name YouTube™ MP3 Downloader v4.4 (Relaunched) 🚀💯 - YTMP3x.com (NO ADS & NEW LAYOUT FOR YT! 🚫🤩)
// @name:pt-BR YouTube™ MP3 Downloader v4.4 (Relançada) 🚀💯 - YTMP3x.com (SEM ANÚNCIOS & NOVO LAYOUT PARA YT! 🚫🤩)
// @description This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:pt-BR Esse script adiciona um botão de download, uma maneira mais rápida de baixar áudio do YouTube e com qualidade garantida. Este site é muito simples, rápido e eficaz para baixar! Melhor de todos!
// @description:ar This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:bg This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:cs This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:da This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:de This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:el This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:eo This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:es This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:fi This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:fr This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:fr-CA This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:he This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:hu This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:id This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:it This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:ja This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:ko This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:nb This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:nl This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:pl This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:ro This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:ru This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:sk This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:sr This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:sv This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:th This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:tr This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:uk This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:ug This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:vi This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:zh-CN This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @description:zh-TW This script adds a download button, a faster way to download audio from YouTube and with guaranteed quality. This site is very simple, fast and effective to download! Best of all!
// @namespace https://greasyfork.org/users/152924
// @homepageURL https://greasyfork.org/scripts/376246
// @supportURL https://greasyfork.org/scripts/376246/feedback
// @author Punisher
// @version 4.4 RC (Relaunched)
// @date 2023-10-16
// @icon https://i.imgur.com/xLl6DWY.png
// @compatible chrome
// @compatible firefox
// @compatible opera
// @compatible safari
// @compatible edge
// @license CC-BY-NC-ND-4.0
// @match *://*.youtube.com/*
// @require https://code.jquery.com/jquery-2.2.4.min.js
// @run-at document-end
// ==/UserScript==

if ("undefined" == typeof(punisherYT)) {
   var punisherYT = {
      currentLink: '//ytmp3x.com',
      currentMedia: null,
      init: function() {
         punisherYT.pageLoad();
      },
      addClick: function(document) {
         if (document.URL.match('youtube.com') && new RegExp('v=[a-zA-Z0-9-_]{11}').exec(document.URL)) {
            var tubeID = RegExp.lastMatch.substr(2);
            var newInterface = $('#meta-contents');
            if (newInterface) {
               var addButton = $(`<div class="style-scope ytd-watch-metadata" id="punisherYT" style=""><button class="yt-spec-button-shape-next yt-spec-button-shape-next--filled yt-spec-button-shape-next--mono yt-spec-button-shape-next--size-m" type="button" id="dropdownMenuButton" aria-haspopup="true" aria-expanded="false" style="padding: 10px; margin: 10px;"><a class="style-scope ytd-subscribe-button-renderer text-white" style="text-decoration: none; color: red; padding-left: 3px; padding-right: 3px" target="_blank" href="`+ punisherYT.currentLink + `/` + tubeID +`"><i class="fas fa-download"></i>Download</a></div>`);
               var subsBtn = document.querySelector("#subscribe-button")
               subsBtn.parentNode.insertBefore(addButton[0], subsBtn)
            }
         }
      },
      pageLoad: function() {
         if (document.body && document.domain == 'www.youtube.com') {
            setInterval(punisherYT.inspectPg, 1000);
            punisherYT.inspectPg();
         }
      },
      inspectPg: function() {
         if (punisherYT.currentMedia != document.URL && typeof ytplayer != 'undefined' && ytplayer) {
            punisherYT.currentMedia = document.URL;
            if ($('#punisherYT')) {
               $('#punisherYT').remove()
            }
         }
         if ($("#meta-contents")[0] && !$('#punisherYT')[0] && typeof ytplayer != 'undefined' && ytplayer) {
            punisherYT.addClick(document);
         }
      },
   };
}
punisherYT.init();