Last active
August 29, 2015 14:12
-
-
Save eriknomitch/bf7ff86405ebb541d625 to your computer and use it in GitHub Desktop.
Tampermonkey CoffeeScript to JavaScript Evaluator
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
function evalCS(source) { | |
// Compile source to Coffeescript (Array) | |
var coffeescript = CoffeeScript.compile(source.toString()).split("\n"); | |
// Prepend 'debugger' | |
coffeescript[1] = "debugger;" + coffeescript[1]; | |
// Join and eval | |
eval(coffeescript.join("\n")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment