Based on method outlined in this comment
Based on approach outlined here.
-
Advantages
Proper syntax highlighting, less noise and the possibility to have separate module files for bigger projects are a few advantages of that approach.
Based on method outlined in this comment
Based on approach outlined here.
Advantages
Proper syntax highlighting, less noise and the possibility to have separate module files for bigger projects are a few advantages of that approach.
//;### | |
// ==UserScript== | |
// @name coffee test | |
// @description Example from https://gist.github.com/joech4n/2c37e7f85c8ea849510d | |
// @namespace https://gist.github.com/joech4n/2c37e7f85c8ea849510d | |
// @include https://gist.github.com/joech4n/2c37e7f85c8ea849510d | |
// @require http://coffeescript.org/v2/browser-compiler/coffeescript.js | |
// @version 1 | |
// ==/UserScript== | |
CoffeeScript.eval((function(){/* | |
# coffeescript from here ### | |
console.log "test" | |
# end of coffeescript #*/}).toString().split("\n").slice(1, -1).join("\n")); |
//;### | |
// ==UserScript== | |
// @name coffee test | |
// @description Example from https://gist.github.com/joech4n/2c37e7f85c8ea849510d | |
// @namespace https://gist.github.com/joech4n/2c37e7f85c8ea849510d | |
// @include https://gist.github.com/joech4n/2c37e7f85c8ea849510d | |
// @require https://greasemonkey.github.io/gm4-polyfill/gm4-polyfill.js | |
// @require http://coffeescript.org/v2/browser-compiler/coffeescript.js | |
// @resource coffee https://gist.github.com/joech4n/2c37e7f85c8ea849510d/raw/2de5d827c21aa67f06ba0633fee56edada425401/test.coffee | |
// @grant GM.getResourceText | |
// @grant GM_getResourceText | |
// @version 1 | |
// ==/UserScript== | |
eval(CoffeeScript.compile(GM_getResourceText('coffee'))); |
console.log "test" |