[YouTube.com] youtube-dl-php - Download Button

For use with: https://github.com/PXgamer/youtube-dl-php

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         [YouTube.com] youtube-dl-php - Download Button
// @namespace    PXgamer
// @version      0.2
// @description  For use with: https://github.com/PXgamer/youtube-dl-php
// @author       PXgamer
// @include      *youtube.com/watch?v=*
// @include      *www.youtube.com/watch?v=*
// @require      https://code.jquery.com/jquery-3.1.0.min.js
// @grant        none
// ==/UserScript==
/*jshint multistr: true */

(function() {
    'use strict';

    var searchGET = '/youtube-dl-php/tests/$_GET.test.php'; // Your path to GET based implementation (i.e. /tests/$_GET.test.php)

    var vid_id = location.href.split('watch?v=')[1].split('&')[0];

    $('#watch8-secondary-actions').append('<div class="yt-uix-menu"><a target="_blank" href="'+searchGET+'?vid_id='+vid_id+'"><button class="yt-uix-button yt-uix-button-size-default yt-uix-button-opacity"><span class="yt-uix-button-content">Download/Parse Video</span></button></a></div>');
})();