mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-13 09:30:53 +00:00
4.20.61
This was a small update until Twitch ripped out half their CSS. * Added: Cross-Origin Storage Bridge for settings, better synchronizing settings on sub-domains with support for binary blobs at the cost of slightly increased start-up time. * Fixed: Rendering issues caused by missing CSS. * Fixed: FFZ Control Center button not appearing on dashboard pages, and appearing in the incorrect place. * Changed: Work towards splitting modules into their own JS files for a faster, more asynchronous startup. * API Added: Methods for serializing and deserializing Blobs for transmission across postMessage.
This commit is contained in:
parent
2c5937c8af
commit
264c375f13
88 changed files with 1685 additions and 500 deletions
27
src/main.js
27
src/main.js
|
@ -68,17 +68,17 @@ class FrankerFaceZ extends Module {
|
|||
// Startup
|
||||
// ========================================================================
|
||||
|
||||
this.discoverModules();
|
||||
this.discoverModules()
|
||||
.then(() => this.enable())
|
||||
.then(() => this.enableInitialModules()).then(() => {
|
||||
const duration = performance.now() - start_time;
|
||||
this.core_log.info(`Initialization complete in ${duration.toFixed(5)}ms.`);
|
||||
this.log.init = false;
|
||||
|
||||
this.enable().then(() => this.enableInitialModules()).then(() => {
|
||||
const duration = performance.now() - start_time;
|
||||
this.core_log.info(`Initialization complete in ${duration.toFixed(5)}ms.`);
|
||||
this.log.init = false;
|
||||
|
||||
}).catch(err => {
|
||||
this.core_log.error('An error occurred during initialization.', err);
|
||||
this.log.init = false;
|
||||
});
|
||||
}).catch(err => {
|
||||
this.core_log.error('An error occurred during initialization.', err);
|
||||
this.log.init = false;
|
||||
});
|
||||
}
|
||||
|
||||
static get() {
|
||||
|
@ -132,9 +132,10 @@ ${typeof x[1] === 'string' ? x[1] : JSON.stringify(x[1], null, 4)}`).join('\n\n'
|
|||
// Modules
|
||||
// ========================================================================
|
||||
|
||||
discoverModules() {
|
||||
const ctx = require.context('src/modules', true, /(?:^(?:\.\/)?[^/]+|index)\.jsx?$/),
|
||||
modules = this.populate(ctx, this.core_log);
|
||||
async discoverModules() {
|
||||
// TODO: Actually do async modules.
|
||||
const ctx = await require.context('src/modules', true, /(?:^(?:\.\/)?[^/]+|index)\.jsx?$/ /*, 'lazy-once' */);
|
||||
const modules = this.populate(ctx, this.core_log);
|
||||
|
||||
this.core_log.info(`Loaded descriptions of ${Object.keys(modules).length} modules.`);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue