fix bio length autosizing

This commit is contained in:
nightpool 2018-03-12 18:41:57 -04:00 committed by chr
parent fcc5feceab
commit 46566ffcb6
1 changed files with 11 additions and 6 deletions

View File

@ -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 }) => {