Last active
August 2, 2020 03:31
-
-
Save Zro617/5fbb539337da4d0100a7 to your computer and use it in GitHub Desktop.
[Scratch] Adds the link to your signature to the top of the forums page where it belongs
This file contains 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== | |
// @author Zro617 | |
// @name Scratch Signature Header Link | |
// @namespace zro617.github.io | |
// @description Puts a link to your signature in the header of the forums | |
// @include https://scratch.mit.edu/discuss/* | |
// @version 1.1 | |
// @grant none | |
// ==/UserScript== | |
if (typeof Scratch.INIT_DATA.LOGGED_IN_USER === "undefined") | |
well_poop_you_need_to_log_in; | |
var sig = document.createElement("li"), | |
siglink = document.createElement("a"); | |
sig.setAttribute("id","navprofile"); | |
siglink.setAttribute("href","/discuss/settings/"+Scratch.INIT_DATA.LOGGED_IN_USER.model.username+"/"); | |
siglink.innerHTML = "Change your signature"; | |
sig.appendChild(siglink); | |
document.querySelector("#brdmenu").querySelectorAll("ul")[1].appendChild(sig); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment