Skip to content

Instantly share code, notes, and snippets.

@m0n5t3r
Created April 25, 2016 18:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m0n5t3r/8a9100f34522d611e2539a496f6e7986 to your computer and use it in GitHub Desktop.
Save m0n5t3r/8a9100f34522d611e2539a496f6e7986 to your computer and use it in GitHub Desktop.
soundgasm download userscript
// ==UserScript==
// @name soundgasm dl
// @namespace local
// @include https://soundgasm.net/*
// @version 1
// @grant none
// ==/UserScript==
;(function(){
var player = $('#jquery_jplayer_1'),
desc = $('.jp-description'),
download = $('<a>Download audio</a>');
desc.append($('<p></p>').css('text-indent', '1em').append(download));
player.bind($.jPlayer.event.canplay, function(e){
var audio = player.find('audio:first');
download.attr('href', audio.attr('src'));
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment