Skip to content

Instantly share code, notes, and snippets.

@CST1229
Last active June 5, 2021 16:10
Show Gist options
  • Save CST1229/053513ef1e8d308df8938464df608f79 to your computer and use it in GitHub Desktop.
Save CST1229/053513ef1e8d308df8938464df608f79 to your computer and use it in GitHub Desktop.
Clean -> Code Scratch Forum Bookmarklet
NOTE: The code button also does the Clean code due to a bug!
Let's be honest, who uses the Clean button in the Scratch forums? Nobody! This is why I've created this bookmarklet, which replaces the Clean button with a Code button.
Just click it and now your Clean button is now a Code button that adds code tags to your text!
I would have liked to reorder it to be next to the Quote button but that's a bit hard to do.
javascript:mySettings.markupSet[21].replaceWith.delete;mySettings.markupSet[21].openWith="[code]";mySettings.markupSet[21].closeWith="[/code]";var codeButton=document.getElementsByClassName("markItUpButton15")[0].childNodes[0];codeButton.title="Code";codeButton.innerHTML="Code";console.log("Loaded Clean -> Code bookmarklet")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment