Youtube to MP3 using Peggo

Adds a Peggo Download button next to the subscribe button, thanks to Peggo for their download service (http://peggo.co/).

当前为 2016-10-11 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

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

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @icon       https://services.gametomato.net/sto/favicon.ico
// @name       Youtube to MP3 using Peggo
// @namespace  https://gametomato.net
// @version    0.1.beta.02
// @description  Adds a Peggo Download button next to the subscribe button, thanks to Peggo for their download service (http://peggo.co/).
// @match         http://www.youtube.com/*
// @match         https://www.youtube.com/*
// @author          HACKSCOMICON
// @grant           none
// @require       http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// ==/UserScript==

function getQueryVariable(variable)
{
       var query = window.location.search.substring(1);
       var vars = query.split("&");
       for (var i=0;i<vars.length;i++) {
               var pair = vars[i].split("=");
               if(pair[0] == variable){return pair[1];}
       }
       return(false);
}

myObject = getQueryVariable("v");

var linkPath ='http://peggo.co/dvr/'+myObject;
$(  '<a id="peggoscript" class="yt-uix-button yt-uix-button-default" target="_blank" href="'+linkPath+'" style="margin-left: 8px; height: 26px; padding: 0 22px;"><img src="https://s32.postimg.org/u8z3vnhad/pggbrntransparent_h100.png" style="vertical-align:middle;color: white;" height="14px" width="43px"> <span class="yt-uix-button-content" style="line-height: 25px; font-size: 12px;">Download</span></a>').insertAfter( "#watch7-subscription-container" );