Youtube DL

Replaces the Youtube download buttons with ones that download the video without premium.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         Youtube DL
// @version      0.2
// @description  Replaces the Youtube download buttons with ones that download the video without premium.
// @author       Riley Campbell
// @namespace    https://hacker-point.com
// @match        https://*.youtube.com/*
// @license      https://opensource.org/license/bsd-3-clause/
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    function recreateNode(el) {
        var newEl = el.cloneNode(false);
        while (el.hasChildNodes()) newEl.appendChild(el.firstChild);
        return newEl
    }

    setInterval(()=>{
        var dropDownDownload = document.querySelectorAll('tp-yt-paper-item[class*="ytd-menu-service-item-download-renderer"]')[0]
        var newdropDownDownload = recreateNode(dropDownDownload);
        newdropDownDownload.setAttribute('onclick', "window.open('https://api.hacker-point.com/ytdlp/?url=' + location.href, '_blank')")
        dropDownDownload.parentNode.replaceChild(newdropDownDownload, dropDownDownload)
    }, 200)

    setInterval(()=>{
        var downloadButton = document.querySelectorAll('button[class="yt-spec-button-shape-next yt-spec-button-shape-next--tonal yt-spec-button-shape-next--mono yt-spec-button-shape-next--size-m yt-spec-button-shape-next--icon-leading "][aria-label="Download"]')[0]
        var newDownloadButton = recreateNode(downloadButton);
        newDownloadButton.setAttribute('onclick', "window.open('https://api.hacker-point.com/ytdlp/?url=' + location.href, '_blank')")
        downloadButton.parentNode.replaceChild(newDownloadButton, downloadButton)
    }, 200)
})();