mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
Extract discourse_javascript.html.erb
to a scrip include
* extract omniauth auth complete inline JS * extract Ember error logging inline JS * transpile `authentication-complete` This is CSP related work
This commit is contained in:
parent
1c9b5e75e7
commit
acba7d2a5d
5 changed files with 46 additions and 39 deletions
|
@ -0,0 +1,17 @@
|
|||
(function() {
|
||||
const authenticationData = JSON.parse(
|
||||
document.getElementById("data-authentication").dataset.authenticationData
|
||||
);
|
||||
|
||||
Discourse.showingSignup = true;
|
||||
require("discourse/routes/application").default.reopen({
|
||||
actions: {
|
||||
didTransition: function() {
|
||||
Em.run.next(function() {
|
||||
Discourse.authenticationComplete(authenticationData);
|
||||
});
|
||||
return this._super();
|
||||
}
|
||||
}
|
||||
});
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue