Rev907, Wait 200ms to opener close, Enable wrapper nonce security by default for new sites
This commit is contained in:
parent
da58f5a89c
commit
b2fb1fcd3c
4 changed files with 10 additions and 5 deletions
|
@ -388,6 +388,7 @@ if window.opener and window.postmessage_nonce_security == false
|
|||
# Window opener security problem workaround: Open a new window, close this one
|
||||
console.log "Opener present:", window.opener
|
||||
setTimeout ( -> # Wait 200ms to parent tab closing
|
||||
console.log "Opener still present:", window.opener
|
||||
if window.opener
|
||||
# Opener still present, display message
|
||||
elem = $("<div class='opener-overlay'><div class='dialog'>You have opened this page by clicking on a link. Please, confirm if you want to load this site.<a href='?' target='_blank' class='button'>Open site</a></div></div>")
|
||||
|
@ -400,6 +401,7 @@ if window.opener and window.postmessage_nonce_security == false
|
|||
window.location.reload()
|
||||
# Opener gone, continue init
|
||||
# window.wrapper = new Wrapper(ws_url)
|
||||
), 150
|
||||
# window.wrapper.reload()
|
||||
), 200
|
||||
else
|
||||
window.wrapper = new Wrapper(ws_url)
|
||||
window.wrapper = new Wrapper(ws_url)
|
||||
|
|
|
@ -1270,6 +1270,7 @@ jQuery.extend( jQuery.easing,
|
|||
console.log("Opener present:", window.opener);
|
||||
setTimeout((function() {
|
||||
var elem;
|
||||
console.log("Opener still present:", window.opener);
|
||||
if (window.opener) {
|
||||
elem = $("<div class='opener-overlay'><div class='dialog'>You have opened this page by clicking on a link. Please, confirm if you want to load this site.<a href='?' target='_blank' class='button'>Open site</a></div></div>");
|
||||
elem.find('a').on("click", function() {
|
||||
|
@ -1281,7 +1282,7 @@ jQuery.extend( jQuery.easing,
|
|||
} else {
|
||||
return window.location.reload();
|
||||
}
|
||||
}), 150);
|
||||
}), 200);
|
||||
} else {
|
||||
window.wrapper = new Wrapper(ws_url);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue