Jump to content

1 Screenshot

About This File

// ==UserScript==
// @name YouTube℠ Ultimate Downloader v13.2 🚀 — All-in-One Media Suite 🌍🎥🎵 | Ad-Free + SponsorBlock 🛡
// @name:pt-BR YouTube℠ Ultimate Downloader v13.2 🚀 — Suíte de Mídia Tudo-em-Um 🌍🎥🎵 | Sem Anúncios + SponsorBlock 🛡
// @description Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:pt-BR Adiciona um botão flutuante para baixar vídeos, Shorts e músicas do YouTube em alta qualidade, com sistema automático ao SponsorBlock integrado e a capacidade de ignorar o pop-up de detecção do YouTube para uma experiência rápida e fluida.
// @description:ar Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:bg Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:cs Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:da Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:de Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:el Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:eo Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:es Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:fi Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:fr Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:fr-CA Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:he Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:hu Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:id Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:it Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:ja Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:ko Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:nb Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:nl Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:pl Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:ro Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:ru Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:sk Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:sr Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:sv Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:th Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:tr Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:uk Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:ug Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:vi Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:zh-CN Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @description:zh-TW Adds a floating button to download YouTube videos, Shorts, and music in high quality, with an automatic system integrated with SponsorBlock and the ability to bypass YouTube's detection pop-up for a fast and seamless experience.
// @namespace https://greasyfork.org/users/152924
// @homepageURL https://greasyfork.org/scripts/34613
// @supportURL https://greasyfork.org/scripts/34613/feedback
// @author Punisher
// @version 13.2.x GA
// @date 2026-06-16
// @icon https://iili.io/fOyuFFS.png
// @compatible chrome
// @compatible firefox
// @compatible opera
// @compatible safari
// @compatible edge
// @compatible brave
// @license CC-BY-NC-ND-4.0
// @match https://*.youtube.com/*
// @match https://music.youtube.com/*
// @grant GM_addStyle
// @run-at document-idle
// @downloadURL https://update.greasyfork.org/scripts/34613/YouTube℠ Ultimate Downloader v132 🚀 — All-in-One Media Suite 🌍🎥🎵 | Ad-Free %2B SponsorBlock 🛡.user.js
// @updateURL https://update.greasyfork.org/scripts/34613/YouTube℠ Ultimate Downloader v132 🚀 — All-in-One Media Suite 🌍🎥🎵 | Ad-Free %2B SponsorBlock 🛡.meta.js
// ==/UserScript==

(function() {
  "use strict";

  let video;
  let sponsorSegments = [];
  let lastVideoIdSB = null;

  const sponsorCategories = ["sponsor", "intro", "outro", "selfpromo", "interaction"];

  async function SB_fetchSegments(videoId) {
    try {
      const res = await fetch(`https://sponsor.ajay.app/api/skipSegments?videoID=${videoId}&categories=${JSON.stringify(["sponsor","intro","outro","selfpromo","interaction"])}`);
      return res.ok ? await res.json() : [];
    } catch { return []; }
  }

  async function SB_loadData() {
    const vid = getVideoID(location.href);
    if (!vid || vid === lastVideoIdSB) return;
    lastVideoIdSB = vid;
    sponsorSegments = await SB_fetchSegments(vid);
  }

  function SB_skipSegments() {
    if (!video || !sponsorSegments.length) return;
    const t = video.currentTime;
    for (const seg of sponsorSegments) {
      const [start, end] = seg.segment;
      if (t >= start && t < end) {
        video.currentTime = end + 0.1;
        break;
      }
    }
  }

  const floatBtnID = "ytPunisherBtn";
  const btnColor = "#333333";
  const MultiURL = [
    { name: "Download 1", baseURL: "//y2mate.stream/convert/?videoId=", useCoder: false, extra: "" },
    { name: "Download 2", baseURL: "//mpcourtefontaine.fr/#q=", useCoder: true, extra: "" },
    { name: "Download 3", baseURL: "//saveanyyoutube.com/watch?v=", useCoder: false, extra: "" },
    { name: "Download 4", baseURL: "//under250art.ca/convert/?id=", useCoder: false, extra: "" },
    { name: "Download 5", baseURL: "//www.climbtree70.fr/?id=", useCoder: false, extra: "" },
    { name: "Download 6", baseURL: "//yout.com/video/?url=", useCoder: true, extra: "" }
  ];

  const cssSelectorArr=[".video-ads",".ytp-ad-module",".ytp-ad-player-overlay",".ytp-ad-overlay-container",".ytp-ad-image-overlay",".ytp-ad-text-overlay",".ytp-ad-progress",".ytp-ad-skip-button",".ytp-ad-skip-button-modern",".ytp-ad-button",".ytp-ad-click-target","ytd-companion-ad-renderer","#player-ads","ytd-ad-slot-renderer","ytd-display-ad-renderer","ytd-promoted-video-renderer","ytd-compact-promoted-video-renderer","ytd-promoted-sparkles-web-renderer","ytd-promoted-sparkles-text-search-renderer","ytd-sponsor-message-renderer","ytd-video-masthead-ad","ytd-search-pyv-renderer","ytd-engagement-panel-section-list-renderer[target-id='engagement-panel-ads']","ytd-shorts-ad-renderer","#shorts-player ytd-ad-slot-renderer","ytd-reel-shelf-renderer ytd-ad-slot-renderer","ytd-reel-video-renderer ytd-ad-slot-renderer","ytm-companion-ad-renderer"];

  const checkRunFlag = id => {
    if (document.getElementById(id)) return true;
    const style = document.createElement("style");
    style.id = id;
    (document.head || document.body).appendChild(style);
    return false;
  };

  const generateRemoveADCssText = arr => arr.map(s => `${s}{display:none!important}`).join(" ");
  const getVideoID = url => /(?:youtube\.com\/(?:watch\?v=|shorts\/)|youtu\.be\/)([0-9A-Za-z_-]{11})/.exec(url)?.[1] || null;
  
  const getVideoDom = () => {
    const v = document.querySelector("#movie_player video, ytd-player video, video.html5-main-video, video");
    if (v && v !== video) {
      video = v;
      video.addEventListener("loadeddata", playAfterAd);
      video.addEventListener("canplay", playAfterAd);
    }
    return video;
  };
  
  const playAfterAd = async () => {
    if (!video || !video.paused || video.readyState < 3 || video.currentTime >= 5) return;
    try { await video.play(); } catch {}
  };
  
  const generateRemoveADHTMLElement = id => {
    if (checkRunFlag(id)) return;
    const style = document.createElement("style");
    style.appendChild(document.createTextNode(generateRemoveADCssText(cssSelectorArr)));
    (document.head || document.body).appendChild(style);
  };

  const closeOverlay = () => {
    document.querySelectorAll("ytd-popup-container a[href='/premium']").forEach(el => el.closest("ytd-popup-container")?.remove());
    document.querySelectorAll("tp-yt-iron-overlay-backdrop").forEach(el => { el.className = ""; el.removeAttribute("opened"); });
  };

  const nativeTouch=function(){
  if(typeof Touch==='undefined'||typeof TouchEvent==='undefined'){this.click();return;}
    const t=new Touch({identifier:Date.now(),target:this,clientX:0,clientY:0});
    this.dispatchEvent(new TouchEvent("touchstart",{bubbles:true,cancelable:true,touches:[t],targetTouches:[t],changedTouches:[t]}));
    this.dispatchEvent(new TouchEvent("touchend",{bubbles:true,cancelable:true,touches:[],targetTouches:[],changedTouches:[t]}));
  };

  const skipAd = () => {
    if (!video) return;
    const btn = document.querySelector(".ytp-ad-skip-button, .ytp-skip-ad-button, .ytp-ad-skip-button-modern");
    const shortMsg = document.querySelector(".video-ads.ytp-ad-module .ytp-ad-player-overlay, .ytp-ad-button-icon");
    if (btn) { btn.click(); nativeTouch.call(btn); video.currentTime = video.duration; }
    else if (shortMsg) video.currentTime = video.duration;
  };

  const removeAdblockPopup = () => {
    document.querySelectorAll("ytd-enforcement-message-view-model,tp-yt-paper-dialog").forEach(el => el.remove());
    document.querySelectorAll("tp-yt-iron-overlay-backdrop").forEach(el => {
      el.removeAttribute("opened");
      el.style.display = "none";
      el.remove();
    });
    document.documentElement.style.overflow = "auto";
    document.body.style.overflow = "auto";
    document.querySelectorAll("#content,#page-manager,ytd-app").forEach(el => {
      el.style.filter = "none";
      el.style.pointerEvents = "auto";
    });
  };

  const removePlayerAD = id => {
    if (checkRunFlag(id)) return;
    const obs = new MutationObserver(() => { getVideoDom(); closeOverlay(); skipAd(); playAfterAd(); removeAdblockPopup(); SB_loadData(); });
    obs.observe(document.body, { childList: true, subtree: true });
  };

  function addFloatButton() {
    if (document.getElementById(floatBtnID)) return;
    const wrapper = document.createElement("div"); wrapper.id = floatBtnID;
    const mainBtn = document.createElement("button"); mainBtn.className = "punisher-main";
    const menu = document.createElement("div"); menu.className = "punisher-menu";
    MultiURL.forEach(link => {
      const btn = document.createElement("button");
      btn.textContent = link.name;
      btn.onclick = () => {
        const vid = getVideoID(location.href);
        if (!vid) return;
        const finalParam = link.useCoder ? decodeURIComponent(location.href) : vid;
        const extra = link.extra || "";
        window.open(link.baseURL + finalParam + extra, "_blank");
        menu.classList.remove("show");
      };
      menu.appendChild(btn);
    });
    wrapper.appendChild(mainBtn);
    wrapper.appendChild(menu);

    function updateMenuSide() {
      const rect = wrapper.getBoundingClientRect();
      const middle = window.innerWidth / 2;
      menu.classList.remove("left", "right");
      if (rect.left > middle) menu.classList.add("left");
      else menu.classList.add("right");
    }

    let dragging = false, ox = 0, oy = 0;
    const limit = (x, y) => ({
      x: Math.max(0, Math.min(x, innerWidth - wrapper.offsetWidth)),
      y: Math.max(0, Math.min(y, innerHeight - wrapper.offsetHeight))
    });

    const start = (x, y) => {
      dragging = true;
      const r = wrapper.getBoundingClientRect();
      ox = x - r.left;
      oy = y - r.top;
      wrapper.style.cursor = "grabbing";
    };

    const move = (x, y) => {
      if (!dragging) return;
      const p = limit(x - ox, y - oy);
      wrapper.style.left = p.x + "px";
      wrapper.style.top = p.y + "px";
      wrapper.style.right = wrapper.style.bottom = "auto";
      updateMenuSide();
    };

    const end = () => {
      dragging = false;
      wrapper.style.cursor = "grab";
    };

    mainBtn.onclick = e => {
      e.stopPropagation();
      updateMenuSide();
      menu.classList.toggle("show");
    };

    document.addEventListener("click", e => {
      if (!wrapper.contains(e.target)) menu.classList.remove("show");
    });

    wrapper.addEventListener("mousedown", e => start(e.clientX, e.clientY));
    document.addEventListener("mousemove", e => move(e.clientX, e.clientY));
    document.addEventListener("mouseup", end);
    wrapper.addEventListener("touchstart", e => start(e.touches[0].clientX, e.touches[0].clientY), { passive: true });
    document.addEventListener("touchmove", e => move(e.touches[0].clientX, e.touches[0].clientY), { passive: true });
    document.addEventListener("touchend", end);
    document.body.appendChild(wrapper);

    let hideTimer;
    function isFullscreen() {
      return document.fullscreenElement || document.webkitFullscreenElement;
    }

    function showButton() {
      wrapper.style.opacity = "1";
      clearTimeout(hideTimer);
      if (isFullscreen()) {
        hideTimer = setTimeout(() => {
          wrapper.style.opacity = "0";
        }, 3000);
      }
    }
    document.addEventListener("fullscreenchange", showButton);
    document.addEventListener("webkitfullscreenchange", showButton);
    document.addEventListener("mousemove", showButton);
    document.addEventListener("touchstart", showButton);
    showButton();
  }

  GM_addStyle(`#${floatBtnID}{position:fixed;top:70%;right:20px;transform:translateY(-50%);z-index:9999;transition:opacity .3s ease;}
    .punisher-main{background:rgba(51,51,51,.85) url("https://iili.io/fObpSDv.png") no-repeat center;background-size:55%;width:55px;height:55px;border-radius:50%;border:none;box-shadow:0 4px 10px rgba(0,0,0,.25);cursor:pointer;}
    .punisher-menu{display:none;flex-direction:column;position:absolute;top:50%;transform:translateY(-50%);background:rgba(51,51,51,.85);border-radius:8px;overflow:hidden;min-width:110px;backdrop-filter:blur(6px);}
    .punisher-menu.show{display:flex;}
    .punisher-menu.left{right:70px;}
    .punisher-menu.right{left:70px;}
    .punisher-menu button{background:transparent;border:none;color:#fff;font-size:11px;padding:6px 10px;cursor:pointer;text-align:left;}
    .punisher-menu button:hover{background:rgba(255,255,255,.08);}`
  );

  GM_addStyle(`ytd-enforcement-message-view-model,tp-yt-paper-dialog,tp-yt-iron-overlay-backdrop{display:none!important}`);

  generateRemoveADHTMLElement("yt-remove-ad-css");
  removePlayerAD("yt-remove-player-ad");

  setInterval(() => {
    SB_skipSegments();
  }, 500);
  addFloatButton();
})();


User Feedback

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
×
×
  • Create New...