mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 21:10:17 +08:00
FIX: Detect window.opener
This commit is contained in:
parent
c3ad0f447a
commit
4730c82b3a
|
@ -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 New Issue
Block a user