mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-17 03:20:53 +00:00
4.0.0-rc15
* Added: Data Management > Backup and Restore * Added: Option to expand merged mass sub gift messages by default. * Added: Option to hide the Discover link in the top navigation bar. * Changed: Use icons for navigation of the emote menu. Fix padding as well. * Fixed: Player problems on Squad Streams pages. * Fixed: Option to hide Live indicators on channels in the directory.
This commit is contained in:
parent
d1cd145b8a
commit
80282914c4
20 changed files with 448 additions and 122 deletions
|
@ -132,6 +132,33 @@ export function setChildren(el, children, no_sanitize, no_empty) {
|
|||
}
|
||||
|
||||
|
||||
export function openFile(contentType, multiple) {
|
||||
return new Promise(resolve => {
|
||||
const input = document.createElement('input');
|
||||
input.type = 'file';
|
||||
input.accept = contentType;
|
||||
input.multiple = multiple;
|
||||
|
||||
input.onchange = () => {
|
||||
const files = Array.from(input.files);
|
||||
resolve(multiple ? files : files[0])
|
||||
}
|
||||
|
||||
input.click();
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function readFile(file, encoding = 'utf-8') {
|
||||
return new Promise((resolve, reject) => {
|
||||
const reader = new FileReader();
|
||||
reader.readAsText(file, encoding);
|
||||
reader.onload = () => resolve(reader.result);
|
||||
reader.onerror = e => reject(e);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
const el = createElement('span');
|
||||
|
||||
export function sanitize(text) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue