2014-05-24 22:50:39 +10:00
|
|
|
<script>
|
|
|
|
Ember.RSVP.configure('onerror', function(e) {
|
2014-08-07 16:52:31 -04:00
|
|
|
// Ignore TransitionAborted exceptions that bubble up
|
|
|
|
if (e && e.message === "TransitionAborted") { return; }
|
|
|
|
|
2014-05-24 22:50:39 +10:00
|
|
|
<% if Rails.env.development? %>
|
2013-12-02 13:15:31 -05:00
|
|
|
if (e) {
|
|
|
|
if (e.message || e.stack) {
|
|
|
|
console.log(e.message);
|
|
|
|
console.log(e.stack);
|
|
|
|
} else {
|
2014-05-09 11:16:56 +02:00
|
|
|
console.log("Uncaught promise: ", e);
|
2013-12-02 13:15:31 -05:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
console.log("A promise failed but was not caught.");
|
|
|
|
}
|
2014-05-24 22:50:39 +10:00
|
|
|
<% end %>
|
|
|
|
window.onerror(e && e.message, null,null,null,e);
|
|
|
|
});
|
|
|
|
</script>
|
2013-12-02 13:15:31 -05:00
|
|
|
|
2013-02-20 15:37:42 +11:00
|
|
|
<script>
|
2016-02-08 08:44:12 +11:00
|
|
|
<%- if !current_user && flash[:authentication_data] %>
|
2017-08-30 16:58:40 +01:00
|
|
|
Discourse.showingSignup = true
|
2016-02-08 08:44:12 +11:00
|
|
|
require('discourse/routes/application').default.reopen({
|
|
|
|
actions: {
|
|
|
|
didTransition: function() {
|
|
|
|
Em.run.next(function(){
|
2016-02-08 09:53:47 +11:00
|
|
|
Discourse.authenticationComplete(<%=flash[:authentication_data].html_safe%>);
|
2016-02-08 08:44:12 +11:00
|
|
|
});
|
|
|
|
return this._super();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
<%- end %>
|
2013-02-20 15:37:42 +11:00
|
|
|
</script>
|
2013-11-27 12:26:27 -05:00
|
|
|
|
2017-04-17 11:52:43 -04:00
|
|
|
<%= preload_script 'browser-update' %>
|