Created
July 8, 2017 12:36
-
-
Save crispinha/274270bcc2b83a3836fc6384499df3eb to your computer and use it in GitHub Desktop.
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== | |
// @name Scratch Discuss Link Adder | |
// @namespace __init__.scratchdiscuss | |
// @description The only link you need By __init__, ninjagolloyd, and MrFlash67 | |
// @include https://scratch.mit.edu/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
if (document.getElementsByClassName("site-nav")[0]) { | |
// Old site | |
console.log("old"); | |
nav = document.getElementsByClassName("site-nav")[0]; | |
nav.innerHTML = ""; | |
for (var index = 0; index < 4; index++) { | |
nav.innerHTML += "<li><a href=\"/discuss/\">Discuss</a></li>"; | |
} | |
document.getElementsByClassName("site-nav")[0].innerHTML = nav.innerHTML; | |
} else { | |
// New site | |
console.log("new"); | |
for (var i of [ | |
document.getElementsByClassName("create")[0], | |
document.getElementsByClassName("explore")[0], | |
document.getElementsByClassName("about")[0], | |
tips = document.getElementsByClassName("tips")[0] | |
]) { | |
i.innerHTML = "<a href=\"/discuss/\"><span>Discuss</span></a>"; | |
} | |
} | |
})(); |
oh wait nvm i did
I'm ninjagolloyd--I don't remember helping with this..?
What does this userscript do? @bigspeedfpv
I believe it changed "tips" back to "discuss"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm ninjagolloyd--I don't remember helping with this..?