Archived
Introduce aurora-core
This commit is contained in:
112 files changed
+3872
No files matched your search
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* 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'));
|
||||
};
|
||||
Reference in new issue
Block a user