Youtube Downloader

Allows you to download videos off YouTube. (Yet another one...)

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         Youtube Downloader
// @namespace    pxgamer
// @version      0.4.1
// @description  Allows you to download videos off YouTube. (Yet another one...)
// @author       pxgamer
// @include      *youtube.com/watch?v=*
// @require      https://code.jquery.com/jquery-1.12.3.min.js
// @grant        none
// ==/UserScript==
/*jshint multistr: true */

(function() {
    'use strict';

    $('#watch8-secondary-actions').prepend('<div class="yt-uix-menu dlmp3"><button class="yt-uix-button yt-uix-button-size-default yt-uix-button-opacity yt-uix-button-has-icon no-icon-markup pause-resume-autoplay yt-uix-menu-trigger yt-uix-tooltip" type="button" role="button" aria-pressed="false" title="Download as MP3" aria-haspopup="true" data-tooltip-text="Download as MP3" aria-labelledby="yt-uix-tooltip2707-arialabel"><span><img style="width: 20px; height: 20px;" src="https://pximg.xyz/images/a80307fb3e74a1c17694454617d1560d.png"></span><span class="yt-uix-button-content">Download as MP3</span></button></div>');

    $('.dlmp3').on('click', function() {
        let url = 'https://www.youtubeinmp3.com/fetch/?format=JSON&video=' + location.href;
        $.ajax({
            method: "GET",
            url: url,
            dataType: "json",
            success: function(data) {
                location.href = data.link;
            }
        });
    });

})();