mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-27 21:05:53 +00:00
4.55.1
* Fixed: Link Cards always opening regardless of the setting. Sorry about that, some code got deleted in a refactor and I didn't notice.
This commit is contained in:
parent
98e5373e9a
commit
29419eee22
6 changed files with 10 additions and 35 deletions
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "frankerfacez",
|
||||
"author": "Dan Salvato LLC",
|
||||
"version": "4.55.0",
|
||||
"version": "4.55.1",
|
||||
"description": "FrankerFaceZ is a Twitch enhancement suite.",
|
||||
"private": true,
|
||||
"license": "Apache-2.0",
|
||||
|
|
|
@ -13,6 +13,7 @@ import SettingsManager from './settings/index';
|
|||
import AddonManager from './addons';
|
||||
import ExperimentManager from './experiments';
|
||||
import {TranslationManager} from './i18n';
|
||||
import PubSubClient from './pubsub';
|
||||
import StagingSelector from './staging';
|
||||
import LoadTracker from './load_tracker';
|
||||
|
||||
|
@ -59,6 +60,7 @@ class FrankerFaceZ extends Module {
|
|||
this.inject('i18n', TranslationManager);
|
||||
this.inject('staging', StagingSelector);
|
||||
this.inject('load_tracker', LoadTracker);
|
||||
this.inject('pubsub', PubSubClient);
|
||||
this.inject('site', Site);
|
||||
this.inject('addons', AddonManager);
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
"name": "MQTT-Based PubSub",
|
||||
"description": "An experimental new pubsub system that should be more reliable than the existing socket cluster.",
|
||||
"groups": [
|
||||
{"value": true, "weight": 50},
|
||||
{"value": false, "weight": 50}
|
||||
{"value": true, "weight": 25},
|
||||
{"value": false, "weight": 75}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -54,8 +54,10 @@ export default class LinkCard extends Module {
|
|||
}
|
||||
|
||||
handleClick(evt) {
|
||||
evt.preventDefault();
|
||||
if ( ! this.settings.get('link-cards.enable') )
|
||||
return;
|
||||
|
||||
evt.preventDefault();
|
||||
this.openCard(evt.url, evt.source);
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ import AddonManager from './addons';
|
|||
import ExperimentManager from './experiments';
|
||||
import {TranslationManager} from './i18n';
|
||||
import StagingSelector from './staging';
|
||||
import PubSubClient from './pubsub';
|
||||
import LoadTracker from './load_tracker';
|
||||
import Site from './sites/player';
|
||||
|
||||
|
@ -53,6 +54,7 @@ class FrankerFaceZ extends Module {
|
|||
this.inject('i18n', TranslationManager);
|
||||
this.inject('staging', StagingSelector);
|
||||
this.inject('load_tracker', LoadTracker);
|
||||
this.inject('pubsub', PubSubClient);
|
||||
this.inject('site', Site);
|
||||
this.inject('addons', AddonManager);
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ export const State = {
|
|||
CONNECTED: 2
|
||||
}
|
||||
|
||||
const decoder = new TextDecoder();
|
||||
|
||||
export default class PubSubClient extends Module {
|
||||
constructor(...args) {
|
||||
|
@ -186,36 +185,6 @@ export default class PubSubClient extends Module {
|
|||
this.emit(`socket:command:${data.cmd}`, data.data, data);
|
||||
});
|
||||
|
||||
/*client.on('connect', () => {
|
||||
this._state = State.CONNECTED;
|
||||
});
|
||||
|
||||
client.on('message', (topic, message, packet) => {
|
||||
let data;
|
||||
try {
|
||||
message = decoder.decode(message);
|
||||
data = JSON.parse(message);
|
||||
} catch(err) {
|
||||
this.log.warn(`Error decoding PubSub message on topic "${topic}":`, err);
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! data.cmd ) {
|
||||
this.log.warn(`Received invalid PubSub message on topic "${topic}":`, data);
|
||||
return;
|
||||
}
|
||||
|
||||
data.topic = topic;
|
||||
|
||||
this.log.debug(`Received command on topic "${topic}" for command "${data.cmd}":`, data.data);
|
||||
this.emit(`socket:command:${data.cmd}`, data.data, data);
|
||||
|
||||
});
|
||||
|
||||
client.on('close', () => {
|
||||
this._state = State.CONNECTING;
|
||||
});*/
|
||||
|
||||
// Subscribe to topics.
|
||||
const topics = [...this._topics.keys()];
|
||||
client.subscribe(topics);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue