Last active
July 2, 2025 19:30
-
-
Save SpiritAxolotl/fe99927f09747f2e5f20f93f76ca4cf5 to your computer and use it in GitHub Desktop.
Artfight Following/Followers in the dropdown
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 Add "Following/Followers" to AF Dropdown Menu | |
// @namespace https://spax.zone/ | |
// @version 2025-07-02 | |
// @description because it shouldn't be hidden in the settings | |
// @author Spax | |
// @match https://artfight.net/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=artfight.net | |
// @grant none | |
// ==/UserScript== | |
const makeCat = (name, topsep) => { | |
const sep = `<div role="separator" class="dropdown-divider"></div>`; | |
return `${topsep?sep:""}<div class="dropdown-header">${name.toUpperCase()}</div>${!topsep?sep:""}`; | |
} | |
const makeDD = (name, url) => { | |
return `<a class="dropdown-item pr-2" href="${url}"> | |
<div class="d-flex align-items-center"> | |
<span class="mr-2">${name}</span> | |
</div> | |
</a>`; | |
}; | |
const dd = document.querySelector(`a[href^="https://artfight.net/~"] + .dropdown-menu > a[href="https://artfight.net/subscriptions"]`); | |
dd.outerHTML += makeCat("USERS", true) + makeDD("Following", "https://artfight.net/user/settings/following") + makeDD("Followers", "https://artfight.net/user/settings/followers"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment