don't init UI by default

This commit is contained in:
Tamius Han 2023-07-10 22:56:26 +02:00
parent 94469ccd0e
commit 638e228ce9
2 changed files with 2 additions and 21 deletions

View File

@ -154,29 +154,12 @@ export default {
await this.settings.init(); await this.settings.init();
this.settingsInitialized = true; this.settingsInitialized = true;
// set up communication with client script // set up communication with client script.
// NOTE: companion onmousemove is set up in UIProbeMixin
window.addEventListener('message', event => { window.addEventListener('message', event => {
this.handleMessage(event); this.handleMessage(event);
}); });
/**
* Setup the "companion" onMouseMove handler to the one in the content script.
* We can handle events with the same function we use to handle events from
* the content script.
*/
// this is handled in UIProbeMixin.js now if UIProbeMixin works, then
// this can be safely removed. Note to self leave the comment explaining
// UI probes are set in the mixin.
// document.addEventListener('mousemove', (event) => {
// this.handleProbe({
// coords: {
// x: event.clientX,
// y: event.clientY
// }
// }, this.origin);
// });
this.eventBus.subscribe('uw-config-broadcast', {function: (data) => { this.eventBus.subscribe('uw-config-broadcast', {function: (data) => {
if (data.type === 'drm-status') { if (data.type === 'drm-status') {
this.statusFlags.hasDrm = data.hasDrm; this.statusFlags.hasDrm = data.hasDrm;

View File

@ -14,8 +14,6 @@ class UI {
this.extensionBase = browser.runtime.getURL('').replace(/\/$/, ""); this.extensionBase = browser.runtime.getURL('').replace(/\/$/, "");
this.eventBus = uiConfig.eventBus; this.eventBus = uiConfig.eventBus;
this.init();
} }
async init() { async init() {