将 osu! beatmap 自动重定向到 Bloodcat
正好有人需要,从旧本子里把它翻出来了。
osu! 的曲包下载服务器在天朝的连接质量实在是不怎么样,而且还有必须登录以及下载数量限制等等等等,总之比较不爽,于是便写了这个 不确定现在还能不能用 =.= 总之先贴在这里 如果运行正常的话,在曲包搜索页面点击下载按钮会直接跳转到 Bloodcat;在曲包详情页的话原来下载的位置会变成红色背景的[Download from Bloodcat]。缺点是不能下载无视频版本。
另:这是个 UserScript,可能需要额外的插件来支持。
Update(20140806): 新增文件格式,点击(应该)就能安装了吧 bloodcat.user.js
// @name Bloodcat Beatmaps for osu!
// @namespace http://ame.moe/
// @version 0.2
// @description Download osu beatmaps from bloodcat without logging in osu!
// @match http://osu.ppy.sh/s/*
// @match http://osu.ppy.sh/b/*
// @match http://osu.ppy.sh/p/beatmaplist*
// @match https://osu.ppy.sh/s/*
// @match https://osu.ppy.sh/b/*
// @match https://osu.ppy.sh/p/beatmaplist*
// @copyright Zhyupe
// ==/UserScript==
$(document).ready(function () {
var bloodcat = function (id) {
return function () { window.location.href = "http://bloodcat.com/osu/m/" + id; return false; }
};
var href = window.location.href;
if (href.indexOf("osu.ppy.sh/s/") != -1 || href.indexOf("osu.ppy.sh/b/") != -1) {
var id = $('.bmt').eq(0).parent().attr('onclick').split('(').pop().replace(')', '');
$(".beatmapDownloadButton").html($('<div>',{
style: "cursor:pointer;background:#c00;width:138px;padding:40px 20px;color:#fff;font-size:12pt",
html: 'Download from<br><span style="font-size:18pt">BloodCat</span>',
click: bloodcat(id)
}));
} else {
var di = $('.icon-download-alt');
if (di.length > 0) {
di.each(function(i,e) {
$(e).parent().attr('href', 'javascript:void(0);');
$(e).parent().unbind('click').bind('click', bloodcat($(e).parent().parent().parent().attr('id')));
});
}
}
})```