1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-17 02:16:54 +00:00
* Added: Option for displaying larger embeds in chat for supported sources. This won't do anything until the link service is updated with support.
* Added: Support for v6 rich content for embeds, tool-tips, and the rich content debugger.
* Changed: Limit the width of rich content embeds in portrait mode.
* Fixed: Clicking badges not working correctly.
* Fixed: Rich embeds being rendered when an unsupported version is returned from the embed server.
* Fixed: The month being off by one in the default filename when saving a settings backup.
* Fixed: The Chat Identity entry not appearing in the chat settings menu when appropriate.
* API Added: `Mutex()` class for limiting something to a certain number of accessors at once.
This commit is contained in:
SirStendec 2021-11-15 17:12:01 -05:00
parent 97c96be276
commit e704677e84
14 changed files with 228 additions and 104 deletions

View file

@ -56,8 +56,6 @@ function datasetBool(value) {
return value == null ? null : value === 'true';
}
const TOOLTIP_VERSION = 5;
export const Links = {
type: 'link',
priority: 50,
@ -91,12 +89,15 @@ export const Links = {
import(/* webpackChunkName: 'rich_tokens' */ 'utilities/rich_tokens'),
this.get_link_info(url)
]).then(([rich_tokens, data]) => {
if ( ! data || (data.v || 1) > TOOLTIP_VERSION )
if ( ! data || (data.v || 1) > rich_tokens.VERSION )
return '';
const ctx = {
tList: (...args) => this.i18n.tList(...args),
i18n: this.i18n,
fragments: data.fragments,
allow_media: show_images,
allow_unsafe: show_unsafe,
onload: () => requestAnimationFrame(() => tip.update())
@ -111,12 +112,14 @@ export const Links = {
if ( data.full ) {
content = rich_tokens.renderTokens(data.full, createElement, ctx);
} else {
if ( data.short ) {
content = rich_tokens.renderTokens(data.short, createElement, ctx);
} else
content = this.i18n.t('card.empty', 'No data was returned.');
}
} else if ( data.mid ) {
content = rich_tokens.renderTokens(data.mid, createElement, ctx);
} else if ( data.short ) {
content = rich_tokens.renderTokens(data.short, createElement, ctx);
} else
content = this.i18n.t('card.empty', 'No data was returned.');
if ( ! data.urls )
return content;
@ -1038,7 +1041,7 @@ export const CheerEmotes = {
if ( length > 12 ) {
out.push(<br />);
out.push(this.i18n.t('tooltip.bits.more', '(and {count} more)', length-12));
out.push(this.i18n.t('tooltip.bits.more', '(and {count, number} more)', length-12));
}
}