youtube2mp3

Convert to mp3 from Youtube clip, if you want to open in background tab - middle click.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name          youtube2mp3
// @namespace     youtube2mp3
// @version       0.851
// @description   Convert to mp3 from Youtube clip, if you want to open in background tab - middle click.
// @match         http*://www.youtube.com/*
// @match         http://www.video2mp3.net/*
// @require       http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// @require	  https://greasyfork.org/scripts/1930-simulate-click/code/Simulate_click.js?version=5025
// @require	  https://greasyfork.org/scripts/386-waituntilexists/code/waitUntilExists.js?version=5026
// @copyright     2014+, Magnus Fohlström.
// ==/UserScript==

//youtube2mp3 auto closes when download starts
$('#social-like, #social-share, #vine-plug, #news-plug').waitUntilExists(function(){ 
    console.log('self.close')
    setInterval(function(){ 
        self.close(); 
    }, 1000 );  
});  

//Auto Click on convert this youtube link and auto click when file is ready to download.
$('#do-download-video').waitUntilExists(function(){    
    setTimeout(function(){ 
        $('#do-download-video').simulate('click'); 
    }, 1000 );
});

function youtube2mp3() {
    
    if( $('#Firstyoutube2mp3').size() == 0 ) 
    {
        var youtube2mp3path_hq ='http://www.video2mp3.net/?url='+encodeURIComponent(document.URL)+"&hq=1";
        
        $(  '<a id="Firstyoutube2mp3" class="yt-uix-button yt-uix-button-default" href="'+youtube2mp3path_hq+'" target="_blank" data-link="" style="margin-left: 8px; height: 26px; border-radius: 10px; padding: 0 22px;">' +
          	'<span class="yt-uix-button-content" style="line-height: 25px; font-variant: small-caps; font-size: 12px; color: rgb(139, 106, 23);">MP3 HQ Download</span></a>'  )
          .insertAfter( "#watch7-subscription-container" );        
    }
    
}

$(document).ready(function(){ 
    
    var youtube2mp3timerId = setInterval(function() {
        youtube2mp3();
    }, 2500);
    
    console.log('youtube2mp3')
    
});