mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
FIX: Detect window.opener
This commit is contained in:
parent
c3ad0f447a
commit
4730c82b3a
1 changed files with 3 additions and 1 deletions
|
@ -22,7 +22,9 @@
|
|||
<p><%=t "login.close_window" %></p>
|
||||
|
||||
<script type="text/javascript">
|
||||
window.opener.Discourse.authenticationComplete(<%=@auth_result.to_client_hash.to_json.html_safe%>);
|
||||
if (window.opener) {
|
||||
window.opener.Discourse.authenticationComplete(<%=@auth_result.to_client_hash.to_json.html_safe%>);
|
||||
}
|
||||
|
||||
// On facebook browser, just redirect and don't close
|
||||
var ua = navigator.userAgent || navigator.vendor || window.opera;
|
||||
|
|
Loading…
Reference in a new issue