Merge pull request #5050 from pixelfed/staging

Update profile embed view, fix height bug
This commit is contained in:
daniel 2024-04-20 05:01:50 -06:00 committed by GitHub
commit 5d407ededf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -86,9 +86,9 @@
parent.append(el.content);
})
}).then(() => {
window.parent.postMessage({type:"setHeight",id:0,height:document.getElementsByTagName("html")[0].scrollHeight},"*");
window.addEventListener("message",e=>{const t=e.data||{};window.parent&&"setHeight"===t.type&&window.parent.postMessage({type:"setHeight",id:t.id,height:document.getElementsByTagName("html")[0].scrollHeight},"*")});
setTimeout(() => {
window.parent.postMessage({type:"setHeight",id:0,height:document.getElementsByTagName("html")[0].scrollHeight},"*");
window.addEventListener("message",e=>{const t=e.data||{};window.parent&&"setHeight"===t.type&&window.parent.postMessage({type:"setHeight",id:t.id,height:document.getElementsByTagName("html")[0].scrollHeight},"*")});
}, 5000);
})
</script>