This repository has been archived on 2026-11-04. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
grisefest-2017-web/src/modules/DemoModuleWithGeolocation/injects/scripts.js
T
2017-04-09 12:48:07 +02:00

29 lines
713 B
JavaScript

/**
* Examples of script injections
*
* Just paste all your snippets here
*/
module.exports = function(context) {
(function(w, d, s, id) {
/**
* Do config and add stuff to
* the global (window) scope
* here
*/
w.myConfig_REPLACE_ME = {
option: 'hello'
};
/**
* The part that injects
* the script with a url
* (only change the REPLACE_ME parts)
*/
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//url-to-script-here_REPLACE_ME.js";
fjs.parentNode.insertBefore(js, fjs);
}(window, document, 'script', 'unique-id-for-script-here_REPLACE_ME'));
};