Skip to content

Instantly share code, notes, and snippets.

@petskratt
Last active August 29, 2015 13:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petskratt/9067016 to your computer and use it in GitHub Desktop.
Save petskratt/9067016 to your computer and use it in GitHub Desktop.
Edit Exercise bookmarklet for Codeacademy
javascript: (function() {
try {
var b = location.pathname.match(/\d+$/)[0] - 1,
c = CCDATA.composer.current_project,
p = c.id,
e = c.checkpoints[b]._id
} catch (g) {
return console.log(g.message)
}
var win=window.open('http://www.codecademy.com/sections/'+p+'/exercises/'+e+'/edit', '_blank');
win.focus();
})();
javascript:(function(){try{var b=location.pathname.match(/\d+$/)[0]-1,c=CCDATA.composer.current_project,p=c.id,e=c.checkpoints[b]._id}catch(g){return console.log(g.message)}var win=window.open('http://www.codecademy.com/sections/'+p+'/exercises/'+e+'/edit','_blank');win.focus();})();

Bookmarklet for easy access to edit mode on Codeacademy course exercises (where you have author / contributor rights).

Based on SCT viewer.

Drag editCA to the bookmarks bar, edit to replace the target with this code.

@fanaugen
Copy link

fanaugen commented Mar 6, 2014

Great to see that the SCT viewer has been helpful in creating this! It’s pretty cool, I remember being annoyed by having to manually switch exercises when working in edit vs. preview mode. Cheers!

@petskratt
Copy link
Author

btw - do you happen to know if there is a preview+debug mode currently live, one that displays SCT errors on console like menitoned at the bottom of http://www.codecademy.com/docs/submission_tests

I struggled with fixing Estonian translations without a solution to debug SCTs, was a great possibility to learn visual/manual debugging of course :-)

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