1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-11 00:20:54 +00:00
* Added: Setting to display Content Flags on directory pages.
* Fixed: The setting to make the player larger on `clips.twitch.tv` pages incorrectly defaulting to true. Closes #1440.
* Fixed: Exception thrown when pressing Escape in chat with a tray open.
* Fixed: Chat not correctly displaying messages until the mouse is moved when using an option to pause chat using mouse movement.
* Fixed: Misspelled entry in the Content Flags list.
* Fixed: Some directory cards not being correctly detected by FFZ.
* Fixed: Color processing throwing an exception if the input value is empty.
* Fixed: Some page elements failing to appear correctly, instead showing an error. Notably this affects the PrattleNot add-on as well as some emote tool-tips. Closes https://github.com/FrankerFaceZ/Add-Ons/issues/193
* Changed: Add a note to the setting to hide extensions that recommends CommanderRoot's Disable Twitch Extensions browser extension.
* Changed: Log a warning when users use external scripts to mess with experiments.
* API Changed: `deep_copy` now correctly handles RegExp, Date, Set, and Map objects.
This commit is contained in:
SirStendec 2023-12-18 17:11:44 -05:00
parent 429553f5d4
commit 80931479c1
14 changed files with 216 additions and 36 deletions

View file

@ -177,18 +177,23 @@ export function createElement(tag: string, props?: any, ...children: DomFragment
if ( lk === 'style' ) {
if ( typeof prop === 'string' )
el.style.cssText = prop;
else
else if ( prop && typeof prop === 'object' )
for(const [key, val] of Object.entries(prop)) {
if ( has(el.style, key) || has(Object.getPrototypeOf(el.style), key) )
(el.style as any)[key] = val;
else
el.style.setProperty(key, prop[key]);
}
else
console.warn('unsupported style value', prop);
} else if ( lk === 'dataset' ) {
for(const k in prop)
if ( has(prop, k) )
el.dataset[camelCase(k)] = prop[k];
if ( prop && typeof prop === 'object' ) {
for(const k in prop)
if ( has(prop, k) )
el.dataset[camelCase(k)] = prop[k];
} else
console.warn('unsupported dataset value', prop);
} else if ( key === 'dangerouslySetInnerHTML' ) {
// React compatibility is cool. SeemsGood