Last active
April 1, 2025 20:47
-
-
Save oSumAtrIX/94d79f87e413f1a79d8b15ecd083e5a6 to your computer and use it in GitHub Desktop.
Tampermonkey script for osum!direct web functionality
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name osum!direct-web | |
// @version 1.4 | |
// @description Modify the direct beatmap download button on the osu! site to support the custom osu protocol handler without osu!supporter | |
// @author oSumAtrIX | |
// @include https://osu.ppy.sh/* | |
// ==/UserScript== | |
(() => { | |
'use strict'; | |
let button; | |
let interval = setInterval(() => { | |
if (!location.pathname.includes('/beatmapsets/') || (button = document.querySelector("div.beatmapset-header__buttons > a[href*=support]")) == null) return; | |
button.querySelector("span > span.btn-osu-big__left > span").innerText = 'osum!direct'; | |
button.attributes.href.value = "osu://dl/" + location.pathname.split('/')[2] | |
}, 500); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment