Greasy Fork

Greasy Fork is available in English.

osu my download

osu beatmap镜像站下载

当前为 2014-08-05 提交的版本,查看 最新版本

// ==UserScript==
// @name       osu my download
// @namespace  
// @version    0.1
// @description  osu beatmap镜像站下载
// @include        http://osu.ppy.sh/s/*
// @include        https://osu.ppy.sh/s/*
// @include        http://osu.ppy.sh/b/*
// @include        https://osu.ppy.sh/b/*
// @copyright  2012+, dazzulay
// ==/UserScript==

// css样式 设置
// 外框样式

GM_addStyle('.my_container{position:fixed;top:140px;right:0px;}');
// 基本btn样式
GM_addStyle('.my_btn{width:150px;height:111px;display:table-cell;vertical-align:middle;margin:0 0 10px 0;padding:10px;font-family:Haettenschweiler,Aril;font-size:40px;font-weight:normal;letter-spacing:2px;color:#fff;border: 4px solid #fff;border-radius:6px;}.my_btn:hover{text-shadow:0 0 20px floralwhite; color:#fff;}'); 
GM_addStyle('.my_orange{background:linear-gradient(to bottom,darkorange,orange,darkorange);}.my_blue{background:linear-gradient(to bottom,darkblue,blue,darkblue);}.my_green{background:linear-gradient(to bottom,darkgreen,green,darkgreen);}');
GM_addStyle('.my_btn span{display:inline-block;vertical-align:middle;text-align:center}'); 

// 获取beatmapid
var bmsrc = $('.bmt').attr('src');
var bmid = bmsrc.substring(bmsrc.indexOf("thumb/")+6,bmsrc.lastIndexOf("l"));

// 添加按钮
$('body').append('<div class="my_container"></div>');
$('.my_container').append('<a class="my_btn my_orange" href="http://bloodcat.com/osu/m/'+bmid+'"><span>DOWNLOAD BLOODCAT</span></a><br/>');
$('.my_container').append('<a class="my_btn my_blue" href="http://loli.al/s/'+bmid+'"><span>DOWNLOAD LOLI.AL</span></a><br/>');
$('.my_container').append('<a class="my_btn my_green" href="http://osu.mengsky.net/d.php?id='+bmid+'"><span>DOWNLOAD MENGSKY</span></a>');