diff --git a/src/entry_ext.js b/src/entry_ext.js index 586f3f75..4e401c0c 100644 --- a/src/entry_ext.js +++ b/src/entry_ext.js @@ -97,7 +97,7 @@ // Now, inject our script into the page context. const HOST = location.hostname, - SERVER = browser.runtime.getURL("web"), + SERVER = browser.runtime.getURL('web'), script = document.createElement('script'); let FLAVOR = diff --git a/src/esbridge.js b/src/esbridge.js index 922f2a67..3fc34318 100644 --- a/src/esbridge.js +++ b/src/esbridge.js @@ -55,7 +55,7 @@ class FFZESBridge { msg, location.origin, transfer ? (Array.isArray(transfer) ? transfer : [transfer]) : undefined - ); + ); } catch(err) { this.log.error('Error sending message to window.', err, msg, transfer); } @@ -63,21 +63,21 @@ class FFZESBridge { onWindowMessage(event) { if ( event.origin !== location.origin ) - return; + return; const msg = event.data, - id = msg?.id, - type = msg?.ffz_esb_type; + id = msg?.id, + type = msg?.ffz_esb_type; if ( ! type ) - return; + return; this.log.info('Received Message from Page', type, id, msg); if ( type === 'init' ) { this.received_init = true; if ( this.active ) - this.runtimeHeartbeat(); + this.runtimeHeartbeat(); } this.runtimeSend(msg); @@ -89,7 +89,7 @@ class FFZESBridge { runtimeOpen() { if ( this.active ) - return Promise.resolve(); + return Promise.resolve(); this.log.info('Connecting to worker.'); @@ -99,7 +99,7 @@ class FFZESBridge { this.port.onDisconnect.addListener(this.onRuntimeDisconnect); if ( this.received_init ) - this.runtimeHeartbeat(); + this.runtimeHeartbeat(); } onRuntimeMessage(msg) { @@ -118,27 +118,27 @@ class FFZESBridge { runtimeHeartbeat() { if ( this._heartbeat ) - return; + return; this._heartbeat = setInterval(() => { if ( this.active ) - this.runtimeSend('heartbeat'); + this.runtimeSend('heartbeat'); }, 30000); } runtimeSend(msg) { if ( typeof msg === 'string' ) - msg = {ffz_esb_type: msg}; + msg = {ffz_esb_type: msg}; if ( ! this.active ) // We need to create our port. - this.runtimeOpen(); + this.runtimeOpen(); // Send the message, knowing we have an open port. this.port.postMessage(msg); } -}; +} FFZESBridge.Logger = Logger; @@ -151,7 +151,7 @@ const VER = FFZESBridge.version_info = Object.freeze({ build: __version_build__, hash: __webpack_hash__, toString: () => - `${VER.major}.${VER.minor}.${VER.revision}${VER.extra || ''}${VER.build ? `+${VER.build}` : ''}` + `${VER.major}.${VER.minor}.${VER.revision}${VER.extra || ''}${VER.build ? `+${VER.build}` : ''}` }); window.FFZESBridge = FFZESBridge; diff --git a/src/modules/chat/actions/actions.jsx b/src/modules/chat/actions/actions.jsx index 4e0012ee..9adcfa87 100644 --- a/src/modules/chat/actions/actions.jsx +++ b/src/modules/chat/actions/actions.jsx @@ -27,7 +27,7 @@ export default class Actions extends Module { this.actions = {}; this.renderers = {}; - this.filterAction = (x) => x.appearance && + this.filterAction = x => x.appearance && this.renderers[x.appearance.type] && (! this.renderers[x.appearance.type].load || this.renderers[x.appearance.type].load(x.appearance)) && (! x.action || this.actions[x.action]); diff --git a/src/modules/chat/actions/components/edit-chat.vue b/src/modules/chat/actions/components/edit-chat.vue index da13a63c..c2beedda 100644 --- a/src/modules/chat/actions/components/edit-chat.vue +++ b/src/modules/chat/actions/components/edit-chat.vue @@ -61,7 +61,6 @@ {{ t('setting.actions.chat.target-incompatible', 'Note: This is not compatible with pasting a message into chat, and will not function if that is enabled.') }} - diff --git a/src/modules/chat/actions/components/edit-profile.vue b/src/modules/chat/actions/components/edit-profile.vue index e2e7bf4c..1c3f7dac 100644 --- a/src/modules/chat/actions/components/edit-profile.vue +++ b/src/modules/chat/actions/components/edit-profile.vue @@ -15,7 +15,9 @@ v-for="profile in profiles" :key="profile.value" :value="profile.value" - >{{ profile.i18n_key ? t(profile.i18n_key, profile.name) : profile.name }} + > + {{ profile.i18n_key ? t(profile.i18n_key, profile.name) : profile.name }} + diff --git a/src/modules/chat/actions/types.jsx b/src/modules/chat/actions/types.jsx index c50ad17e..d9d19dd0 100644 --- a/src/modules/chat/actions/types.jsx +++ b/src/modules/chat/actions/types.jsx @@ -40,7 +40,7 @@ export const pin = { }, hidden(data, message, current_room, current_user, mod_icons, instance) { - let line = instance; + const line = instance; if ( ! line ) return true; diff --git a/src/modules/chat/badges.jsx b/src/modules/chat/badges.jsx index 4f0dc3b6..12779e3d 100644 --- a/src/modules/chat/badges.jsx +++ b/src/modules/chat/badges.jsx @@ -739,10 +739,10 @@ export default class Badges extends Module { } return { - room_id: room_id, - room_login: room_login, - user_id: user_id, - user_login: user_login, + room_id, + room_login, + user_id, + user_login, data }; } @@ -1279,11 +1279,11 @@ export default class Badges extends Module { return; if ( d.lifetime ) - return '\n' + this.i18n.t('badges.subwoofer.lifetime', 'Lifetime Subwoofer'); + return `\n${ this.i18n.t('badges.subwoofer.lifetime', 'Lifetime Subwoofer')}`; - return '\n' + this.i18n.t('badges.subwoofer.months', '({count, plural, one {# Month} other {# Months}})', { + return `\n${ this.i18n.t('badges.subwoofer.months', '({count, plural, one {# Month} other {# Months}})', { count: d.months - }); + })}`; }) }; } diff --git a/src/modules/chat/components/chat-line.vue b/src/modules/chat/components/chat-line.vue index c46b4584..615cf393 100644 --- a/src/modules/chat/components/chat-line.vue +++ b/src/modules/chat/components/chat-line.vue @@ -1,5 +1,4 @@