YouTube mp3 download with youtube-mp3.org

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

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greasyfork.org/scripts/7725/33765/YouTube%20mp3%20download%20with%20youtube-mp3org.js

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 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 mp3 download with youtube-mp3.org
// @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);
}