// ==UserScript== // @name osu! Download Button // @description Download beatmaps from some mirror sites (Bloodcat, Mengsky and inso) // @author Konano // @include *osu.ppy.sh/s* // @include *osu.ppy.sh/b* // @include *osu.ppy.sh/p/beatmap?b=* // @include *osu.ppy.sh/p/beatmap?s=* // @version 2.1 // @namespace https://greasyfork.org/users/88022 // @downloadURL https://update.greasyfork.icu/scripts/25883/osu%21%20Download%20Button.user.js // @updateURL https://update.greasyfork.icu/scripts/25883/osu%21%20Download%20Button.meta.js // ==/UserScript== (function($) { var mirrorDown = '
'; $('.posttext:first').before(mirrorDown); document.getElementById('mirrorMengsky').onclick = function() { location.href = 'http://osu.mengsky.net/api/download/' + $('.bmt:last').attr('src').match(/\d+/); } document.getElementById('mirrorInso').onclick = function() { location.href = 'http://inso.link/?source=OsuDownloadButtom&m='+$('.bmt:last').attr('src').match(/\d+/); } document.getElementById('mirrorBloodcat').onclick = function() { location.href = 'http://bloodcat.com/osu/m/'+$('.bmt:last').attr('src').match(/\d+/); } })(unsafeWindow.$);