Created
October 24, 2016 18:32
-
-
Save LukasReschke/3eebebb7a87802c5b786d09b05642fe0 to your computer and use it in GitHub Desktop.
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
diff --git a/js/require_config.js b/js/require_config.js | |
index 7e90525..5b1a5d1 100644 | |
--- a/js/require_config.js | |
+++ b/js/require_config.js | |
@@ -11,8 +11,8 @@ | |
*/ | |
(function() { | |
- 'use strict'; | |
+ 'use strict'; | |
requirejs.config({ | |
baseUrl: './../../../apps/mail/js', | |
paths: { | |
@@ -44,6 +44,18 @@ | |
baseUrl: OC.linkTo('mail', 'js') | |
}); | |
+ requirejs.createNode = function (config, moduleName) { | |
+ var node = config.xhtml ? | |
+ document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') : | |
+ document.createElement('script'); | |
+ node.type = config.scriptType || 'text/javascript'; | |
+ node.charset = 'utf-8'; | |
+ node.async = true; | |
+ | |
+ node.setAttribute("nonce", btoa(OC.requestToken)); | |
+ return node; | |
+ }; | |
+ | |
require([ | |
'init' | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment