Last active
January 14, 2016 17:55
-
-
Save iamtis/da79400492ce98b153fb to your computer and use it in GitHub Desktop.
download button on YouTube and if it doesn't auto download it will open in a new tab.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Youtube MP3 Download Button | |
// @namespace http://m2u.xyz | |
// @version 1.2 | |
// @description Adds a MP3 Download button next to the subscribe button, thanks to youtubeinmp3 for their simple download service (http://youtubeinmp3.com/api/). | |
// @match http*://www.youtube.com/* | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js | |
// @copyright IamTis inc. | |
// ==/UserScript== | |
var linkPath ='http://youtubeinmp3.com/fetch/?video='+encodeURIComponent(document.URL)+"&hq=1"; | |
$( '<a id="youtube2mp3" class="yt-uix-button yt-uix-button-default" href="'+linkPath+'" target="_blank" style="margin-left: 8px; height: 26px; padding: 0 22px; /* background-color: #e62117; */"><img src="http://youtubeinmp3.com/icon/download.png" style="vertical-align:middle;color: white;"> <span class="yt-uix-button-content" style="line-height: 25px; /* font-variant: small-caps; */ font-size: 12px; /* color: #fefefe; */">MP3 Download</span></a>').insertAfter( "#watch7-subscription-container" ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment