Skip to content

Instantly share code, notes, and snippets.

@gosoccerboy5
Last active June 19, 2021 03:16
Show Gist options
  • Save gosoccerboy5/f16089082682fde2f30b79f005cb5c13 to your computer and use it in GitHub Desktop.
Save gosoccerboy5/f16089082682fde2f30b79f005cb5c13 to your computer and use it in GitHub Desktop.
Code to change the quote function on the forums
javascript: window.copy_paste = function(id) {
let substr = id.toString().substring(1);
let username = document.querySelector("#" + id).querySelector(".username").innerText;
fetch("/discuss/post/" + substr + "/source/")
.then(res => res.text())
.then(function(data) {
paste("[quote=" + username + "][small][i]([url=https://scratch.mit.edu/discuss/post/" + substr + "][color=grey]Original post[/color][/url])[/i][/small]\n" + data + " [/quote]");
});
};
void(0);
// Use at your own risk! If you do not trust the code, DO NOT USE IT!
javascript:window.copy_paste=function(id){let substr=id.toString().substring(1);let username=document.querySelector("#"+id).querySelector(".username").innerText;fetch("/discuss/post/"+substr+"/source/").then(res=>res.text()).then(function(data){paste("[quote="+username+"][small][i]([url=https://scratch.mit.edu/discuss/post/"+substr+"][color=grey]Original post[/color][/url])[/i][/small]\n"+data+" [/quote]")})};void 0;
@gosoccerboy5
Copy link
Author

gosoccerboy5 commented Jun 18, 2021

what it looks like:
Screen Shot 2021-06-18 at 5 13 23 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment