mirror of
https://github.com/discourse/discourse.git
synced 2025-03-06 11:19:51 +00:00
FIX: Detect window.opener
This commit is contained in:
parent
c3ad0f447a
commit
4730c82b3a
@ -22,7 +22,9 @@
|
|||||||
<p><%=t "login.close_window" %></p>
|
<p><%=t "login.close_window" %></p>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
if (window.opener) {
|
||||||
window.opener.Discourse.authenticationComplete(<%=@auth_result.to_client_hash.to_json.html_safe%>);
|
window.opener.Discourse.authenticationComplete(<%=@auth_result.to_client_hash.to_json.html_safe%>);
|
||||||
|
}
|
||||||
|
|
||||||
// On facebook browser, just redirect and don't close
|
// On facebook browser, just redirect and don't close
|
||||||
var ua = navigator.userAgent || navigator.vendor || window.opera;
|
var ua = navigator.userAgent || navigator.vendor || window.opera;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user