mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-28 05:15:54 +00:00
4.31.1
* Fixed: Infinite loop bug with the `<markdown />` Vue component. * Fixed: Bug with the method that calculates the chat input height causing chat input to disappear completely. * Changed: When an add-on fails to enable, a slightly better message will be logged to console.
This commit is contained in:
parent
e704677e84
commit
a35387abcf
5 changed files with 55 additions and 29 deletions
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "frankerfacez",
|
"name": "frankerfacez",
|
||||||
"author": "Dan Salvato LLC",
|
"author": "Dan Salvato LLC",
|
||||||
"version": "4.31.0",
|
"version": "4.31.1",
|
||||||
"description": "FrankerFaceZ is a Twitch enhancement suite.",
|
"description": "FrankerFaceZ is a Twitch enhancement suite.",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
|
|
@ -85,7 +85,10 @@ export default class AddonManager extends Module {
|
||||||
// main script's execution.
|
// main script's execution.
|
||||||
for(const id of this.enabled_addons)
|
for(const id of this.enabled_addons)
|
||||||
if ( this.hasAddon(id) && this.doesAddonTarget(id) )
|
if ( this.hasAddon(id) && this.doesAddonTarget(id) )
|
||||||
this._enableAddon(id);
|
this._enableAddon(id).catch(err => {
|
||||||
|
this.log.error(`An error occured while enabling the add-on "${id}":` , err);
|
||||||
|
this.log.capture(err);
|
||||||
|
});
|
||||||
|
|
||||||
this.emit(':ready');
|
this.emit(':ready');
|
||||||
});
|
});
|
||||||
|
@ -353,7 +356,10 @@ export default class AddonManager extends Module {
|
||||||
|
|
||||||
// Actually load it.
|
// Actually load it.
|
||||||
if ( this.doesAddonTarget(id) )
|
if ( this.doesAddonTarget(id) )
|
||||||
this._enableAddon(id);
|
this._enableAddon(id).catch(err => {
|
||||||
|
this.log.error(`An error occured while enabling the add-on "${id}":` , err);
|
||||||
|
this.log.capture(err);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async disableAddon(id, save = true) {
|
async disableAddon(id, save = true) {
|
||||||
|
|
|
@ -298,12 +298,13 @@ export default class Input extends Module {
|
||||||
const t = this;
|
const t = this;
|
||||||
|
|
||||||
const originalOnKeyDown = inst.onKeyDown,
|
const originalOnKeyDown = inst.onKeyDown,
|
||||||
originalOnMessageSend = inst.onMessageSend;
|
originalOnMessageSend = inst.onMessageSend,
|
||||||
//old_resize = inst.resizeInput;
|
old_resize = inst.resizeInput;
|
||||||
|
|
||||||
inst.resizeInput = function(msg) {
|
inst.resizeInput = function(msg, ...args) {
|
||||||
|
try {
|
||||||
if ( msg ) {
|
if ( msg ) {
|
||||||
if ( inst.chatInputRef ) {
|
if ( inst.chatInputRef instanceof Element ) {
|
||||||
const style = getComputedStyle(inst.chatInputRef),
|
const style = getComputedStyle(inst.chatInputRef),
|
||||||
height = style && parseFloat(style.lineHeight || 18) || 18,
|
height = style && parseFloat(style.lineHeight || 18) || 18,
|
||||||
t = height * 1 + 20,
|
t = height * 1 + 20,
|
||||||
|
@ -318,6 +319,10 @@ export default class Input extends Module {
|
||||||
inst.setState({
|
inst.setState({
|
||||||
numInputRows: 1
|
numInputRows: 1
|
||||||
});
|
});
|
||||||
|
} catch (err) {
|
||||||
|
t.log.error('Error in resizeInput', err);
|
||||||
|
return old_resize.call(this, msg, ...args);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inst.messageHistory = [];
|
inst.messageHistory = [];
|
||||||
|
|
|
@ -8,6 +8,9 @@
|
||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-input__textarea .tw-textarea {
|
.chat-input__textarea {
|
||||||
|
.chat-wysiwyg-input__editor,
|
||||||
|
.tw-textarea {
|
||||||
padding-left: 1rem !important;
|
padding-left: 1rem !important;
|
||||||
}
|
}
|
||||||
|
}
|
|
@ -14,22 +14,34 @@ export default {
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
md: getMD()
|
output: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
watch: {
|
||||||
output() {
|
source() {
|
||||||
if ( ! this.md )
|
this.rebuild();
|
||||||
return '';
|
|
||||||
|
|
||||||
return this.md.render(this.source);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
|
this.md = getMD();
|
||||||
if ( ! this.md )
|
if ( ! this.md )
|
||||||
awaitMD().then(md => this.md = md);
|
awaitMD().then(md => {
|
||||||
|
this.md = md;
|
||||||
|
this.rebuild();
|
||||||
|
});
|
||||||
|
else
|
||||||
|
this.rebuild();
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
rebuild() {
|
||||||
|
if ( ! this.md )
|
||||||
|
this.output = '';
|
||||||
|
else
|
||||||
|
this.output = this.md.render(this.source);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue