Add script nonce when loading js for globe in sidebar
This commit is contained in:
parent
e0756a56a4
commit
46e694a5c8
2 changed files with 11 additions and 2 deletions
|
@ -564,7 +564,11 @@ class Sidebar extends Class
|
|||
if @tag.find(".globe").hasClass("loading")
|
||||
setTimeout (=>
|
||||
if typeof(DAT) == "undefined" # Globe script not loaded, do it first
|
||||
$.getScript("/uimedia/globe/all.js", @displayGlobe)
|
||||
script_tag = $("<script>")
|
||||
script_tag.attr("nonce", @wrapper.script_nonce)
|
||||
script_tag.attr("src", "/uimedia/globe/all.js")
|
||||
script_tag.on("load", @displayGlobe)
|
||||
document.head.appendChild(script_tag[0])
|
||||
else
|
||||
@displayGlobe()
|
||||
), 600
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue