1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-09 07:40:53 +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

@ -8,6 +8,8 @@ import {has} from 'utilities/object';
import Markdown from 'markdown-it';
import MILA from 'markdown-it-link-attributes';
export const VERSION = 6;
export const TOKEN_TYPES = {};
const validate = (input, valid) => valid.includes(input) ? input : null;
@ -243,6 +245,17 @@ export function renderTokens(tokens, createElement, ctx, markdown) {
export default renderTokens;
// ============================================================================
// Token Type: Reference
// ============================================================================
TOKEN_TYPES.ref = function(token, createElement, ctx) {
const frag = ctx.fragments?.[token.name];
if (frag )
return renderTokens(frag, createElement, ctx);
}
// ============================================================================
// Token Type: Box
// ============================================================================
@ -667,9 +680,11 @@ function header_normal(token, createElement, ctx) {
content.appendChild(image);
else
content.insertBefore(image, content.firstChild);
} else {
console.warn('Add React support!');
console.log(content);
} else if ( Array.isArray(content?.props?.children) ) {
if ( right )
content.props.children.push(image);
else
content.props.children.unshift(image);
}
} else {