Skip to content

Instantly share code, notes, and snippets.

@CST1229
Last active July 10, 2023 11:12
Show Gist options
  • Save CST1229/f150314ab650b4c3c4e18e757f29a107 to your computer and use it in GitHub Desktop.
Save CST1229/f150314ab650b4c3c4e18e757f29a107 to your computer and use it in GitHub Desktop.
Automatic Original Post Scratch Forum bookmarklet
EDIT: A similar thing to this bookmarklet is now in Scratch Addons,
as the "Automatically add post link to quotes" option in the "Quote post number" addon.
Check OPScratchForumBookmarkCode.txt for the code!
Put the below code as a bookmark and click it to activate.
Once activated, when you quote a post, it will automatically add a link to the original post.
Obivously will only last until the page reloads.
javascript:function copy_paste(id){var post=$('#'+id);var username=post.find(".username").text();$.ajax('/discuss/post/'+id.substr(1)+'/source/').done(function(data){paste('[quote='+username+']'+data+'\n[url=scratch.mit.edu/discuss/post/'+id.substring(1)+'][small][i][color=#888888][[]Original post][/color][/i][/small][/url]'+'[/quote]\n');});}console.log("Loaded [Original post] bookmarklet");
@yoyomonem
Copy link

It's BELOW, not above.

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