您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Allows you to mutual and subscribe to your own osu profile
当前为
// ==UserScript== // @name Mutual and suscribe to youself on osu! // @namespace osu // @version 2.0.0 // @description Allows you to mutual and subscribe to your own osu profile // @author Magnus Cosmos // @include https://osu.ppy.sh/* // @require https://greasyfork.org/scripts/441010-osupageobserver/code/OsuPageObserver.js // ==/UserScript== function getReactFiber(el) { return el[Object.keys(el).filter(prop => /__reactFiber/.test(prop))[0]]; } function getReactProps(el) { return el[Object.keys(el).filter(prop => /__reactProps/.test(prop))[0]]; } const observer = new OsuWebObserver(_, () => { const friendButton = document.querySelector(".user-action-button"); const subscribeButton = document.querySelectorAll(".user-action-button")[1]; if (friendButton && !friendButton.classList.contains("user-action-button--mutual")) { friendButton.classList.add("user-action-button--mutual"); const state = getReactProps(friendButton).children[1]._owner.stateNode; state.followersWithoutSelf++; } if (subscribeButton && subscribeButton.disabled) { subscribeButton.removeAttribute("disabled"); subscribeButton.onclick = getReactProps(subscribeButton).onClick; } });