forked from cybrespace/mastodon
fix bio length autosizing
This commit is contained in:
parent
fcc5feceab
commit
46566ffcb6
|
@ -14,12 +14,6 @@ window.addEventListener('message', e => {
|
|||
id: data.id,
|
||||
height: document.getElementsByTagName('html')[0].scrollHeight,
|
||||
}, '*');
|
||||
|
||||
if (document.fonts && document.fonts.ready) {
|
||||
document.fonts.ready.then(sizeBioText);
|
||||
} else {
|
||||
sizeBioText();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -85,6 +79,17 @@ function main() {
|
|||
})
|
||||
.catch(error => console.error(error));
|
||||
}
|
||||
|
||||
[].forEach.call(document.querySelectorAll('[data-component="Card"]'), (content) => {
|
||||
const props = JSON.parse(content.getAttribute('data-props'));
|
||||
ReactDOM.render(<CardContainer locale={locale} {...props} />, content);
|
||||
});
|
||||
|
||||
if (document.fonts && document.fonts.ready) {
|
||||
document.fonts.ready.then(sizeBioText);
|
||||
} else {
|
||||
sizeBioText();
|
||||
}
|
||||
});
|
||||
|
||||
delegate(document, '.webapp-btn', 'click', ({ target, button }) => {
|
||||
|
|
Loading…
Reference in New Issue