Last active
April 20, 2017 14:54
-
-
Save tjibbevanderlaan/d800f06e7a1c654c051667c94afb9aa4 to your computer and use it in GitHub Desktop.
Add external module in nemo
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
<script id="nemoUserFunctions"> | |
// nemo_onload is a predefined function, invoked by | |
// the nemo engine as soon as the topic is loaded | |
function nemo_onload(e) { | |
// RequireJS is an external module, included in the nemo | |
// engine, which loads all internal modules. With the following | |
// code, you can load your own piece of code. The module excepts | |
// '.js'-files, so specifying the extension name is not needed. | |
// Please put your own libraries in the 'userscripts'-folder! | |
// The NemoPackager will copy libraries only, if they are located in | |
// '/_web/userscripts'. | |
// Note: the '../../' is a small bug; requirejs searches normally in | |
// scripts/libs for modules | |
require(['../../userscripts/yourlibrary'], function(yourLibrary){ | |
yourLibrary.doAction(); | |
}); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment