osu! Download from mirror

Download beatbaps from mirror site

  1. // ==UserScript==
  2. // @name osu! Download from mirror
  3. // @namespace http://www.icycat.com
  4. // @description Download beatbaps from mirror site
  5. // @author 冻猫
  6. // @include *osu.ppy.sh/b*
  7. // @include *osu.ppy.sh/s*
  8. // @version 1.6
  9. // ==/UserScript==
  10.  
  11. (function($) {
  12.  
  13. var mirrorDown = '<div id="mirroDown" style="float:right;width:100px;"><button id="mirrorBloodcat" style="background-color:#78AB23;border:1px solid;border-radius:5px;color:#FFFFFF;cursor:pointer;font-size:1.5em;font-weight:bold;height:130px;margin:4px 1px 0 5px;width:96px;">Download from bloodcat</button></div>';
  14.  
  15. $('.beatmapDownloadButton:first').before(mirrorDown);
  16.  
  17. document.getElementById('mirrorBloodcat').onclick = function() {
  18. location.href = 'https://bloodcat.com/osu' + $('.beatmapDownloadButton:last a').attr('href').replace('d', 'm');
  19. }
  20.  
  21. })(unsafeWindow.$);