Get new wrapper nonce API command to proper reload iframe content

This commit is contained in:
shortcutme 2018-04-28 22:01:12 +02:00
parent 0e84bf95da
commit af4b4ae85c
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 13 additions and 5 deletions

View file

@ -545,12 +545,16 @@ class Wrapper
return false
@loading.printLine res
@inner_loaded = false # Inner frame not loaded, just a 404 page displayed
if reload
src = $("iframe").attr("src")
$("iframe").attr "src", ""
$("iframe").attr "src", src
if reload then @reloadIframe()
return false
reloadIframe: =>
src = $("iframe").attr("src")
@ws.cmd "serverGetWrapperNonce", [], (wrapper_nonce) =>
src = src.replace(/wrapper_nonce=[A-Za-z0-9]+/, "wrapper_nonce=" + wrapper_nonce)
@log "Reloading iframe using url", src
$("iframe").attr "src", src
log: (args...) ->
console.log "[Wrapper]", args...