Youtube-mp3.org Link

Simply add a "Download Mp3" link to send url to http://www.youtube-mp3.org/it

目前為 2015-01-27 提交的版本,檢視 最新版本

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.cn-greasyfork.org/scripts/7725/33721/Youtube-mp3org%20Link.js

// ==UserScript==
// @name           Youtube-mp3.org Link
// @namespace      Restpeace
// @description    Simply add a "Download Mp3" link to send url to http://www.youtube-mp3.org/it
// @include        http://*youtube.*/*watch*
// @include        https://*youtube.*/*watch*
// @version        1.0
// @author 		   Restpeace
// ==/UserScript==

// ==ChangeLog==
// @history        1.0 Updated headers.
// ==/ChangeLog==

var video=window.location.href;
var newLink = document.createElement("a");
    newLink.setAttribute('href', "http://www.youtube-mp3.org/it?youtube-url="+video);
	newLink.setAttribute('target', "_blank");
 	newLink.innerHTML = 'Mp3 Download';
var b1=document.getElementById("watch8-secondary-actions");
var b2=document.getElementsByClassName("yt-uix-menu")[0];
if(b1){
    b1.appendChild(newLink);
}else{
    b2.appendChild(newLink);
}