mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-09-15 17:46:55 +00:00
4.75.0
* Added: Setting to use native styling for subscription notices in chat. (Closes #1551) * Added: Setting to hide the stories UI in the side navigation. (Closes #1531) * Added: Setting to hide specific users from the directory and sidebar. * Changed: Hide the top navigation's search field when using minimal navigation for a cleaner look. (Closes #1556) * Changed: More internal changes for the support to Manifest v3. * Fixed: Uploading logs from the FFZ Control Center not working. * API Changed: Removed support for `no_sanitize` from `setChildren`. I don't think anything was currently using this, but going forward it is unsupported. We want to avoid using `innerHTML` as much as possible to simplify the approval process.
This commit is contained in:
parent
533bf52c9e
commit
1ee737f2ca
17 changed files with 669 additions and 280 deletions
|
@ -1,6 +1,6 @@
|
|||
|
||||
import {has} from 'utilities/object';
|
||||
import type { DomFragment, OptionalArray } from './types';
|
||||
import type { DomFragment } from './types';
|
||||
import { DEBUG } from './constants';
|
||||
|
||||
const ATTRS = [
|
||||
|
@ -242,6 +242,9 @@ export function setChildren(
|
|||
no_sanitize: boolean = false,
|
||||
no_empty: boolean = false
|
||||
) {
|
||||
if (no_sanitize)
|
||||
window.FrankerFaceZ.get().log.warn('call to setChildren with no_sanitize set to true -- this is no longer supported');
|
||||
|
||||
if (children instanceof Node ) {
|
||||
if (! no_empty )
|
||||
element.innerHTML = '';
|
||||
|
@ -260,15 +263,20 @@ export function setChildren(
|
|||
else if (child) {
|
||||
const val = typeof child === 'string' ? child : String(child);
|
||||
|
||||
element.appendChild(no_sanitize ?
|
||||
range.createContextualFragment(val) : document.createTextNode(val));
|
||||
// We no longer support no_sanitize
|
||||
//element.appendChild(no_sanitize ?
|
||||
// range.createContextualFragment(val) : document.createTextNode(val));
|
||||
|
||||
element.appendChild(document.createTextNode(val));
|
||||
}
|
||||
|
||||
} else if (children) {
|
||||
const val = typeof children === 'string' ? children : String(children);
|
||||
|
||||
element.appendChild(no_sanitize ?
|
||||
range.createContextualFragment(val) : document.createTextNode(val));
|
||||
// We no longer support no_sanitize
|
||||
//element.appendChild(no_sanitize ?
|
||||
// range.createContextualFragment(val) : document.createTextNode(val));
|
||||
element.appendChild(document.createTextNode(val));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue