1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-10-10 13:20:51 +00:00
FrankerFaceZ/src/utilities/timing.js
SirStendec fa3d73e05a 4.20.18
* Added: Setting to apply username colors to chat mentions. (Closes #753)
* Changed: Stream links now use a darker color.
* Changed: Make the icon for FFZ's Alternative Viewer Count slightly larger.
* Fixed: Crazy flickering when disabling hosting.
* Fixed: Stream links showing up on the home page and not just the live page.
* Fixed: Better detection for channels where the Host button should appear.
* Fixed: FFZ's Alternative Viewer Count metadata not updating correctly when FS Chat is in use.
2020-07-24 17:55:11 -04:00

40 lines
No EOL
932 B
JavaScript

'use strict';
// ============================================================================
// Timing Tracker
// For figuring out FFZ loading
// ============================================================================
import Module from 'utilities/module';
export default class Timing extends Module {
constructor(...args) {
super(...args);
this.events = [];
this._listener = null;
this.on('settings:enabled', () => {
this.resolve('settings').addUI('timing.info', {
path: 'Debugging > Performance >> Info @{"sort": -1000}',
force_seen: true,
component: 'performance',
setListener: fn => this._listener = fn,
getEvents: () => this.events,
getTiming: () => this
});
});
}
__time() { /* no-op */ } // eslint-disable-line class-methods-use-this
addEvent(event) {
event.ts = performance.now();
this.events.push(event);
if ( this._listener )
this._listener(event);
}
}