mirror of
https://github.com/flarum/core.git
synced 2025-07-30 21:20:24 +02:00
[WIP] JS Extender API foundation (#1468)
* Run extenders exported by extensions * Add some basic extenders * Patch Mithril as the very first thing so extension code can run safely * Load the payload into the app before booting extensions * Setup default routes before booting extensions
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
@if ($allowJs)
|
||||
<script>
|
||||
document.getElementById('flarum-loading').style.display = 'block';
|
||||
var flarum={extensions:{}};
|
||||
var flarum = {extensions: {}};
|
||||
</script>
|
||||
|
||||
@foreach ($jsUrls as $url)
|
||||
@@ -42,7 +42,9 @@
|
||||
@if (! $debug)
|
||||
try {
|
||||
@endif
|
||||
flarum.core.app.boot(@json($payload));
|
||||
flarum.core.app.load(@json($payload));
|
||||
flarum.core.app.bootExtensions(flarum.extensions);
|
||||
flarum.core.app.boot();
|
||||
@if (! $debug)
|
||||
} catch (e) {
|
||||
window.location += (window.location.search ? '&' : '?') + 'nojs=1';
|
||||
|
Reference in New Issue
Block a user