Trigger twitter button fade on script load

This commit is contained in:
Sam Carlton 2020-11-16 14:03:07 -06:00
parent 3f5f0eb764
commit b12daa87b1

View file

@ -57,13 +57,21 @@ export default {
twitterScript.setAttribute('async','true')
twitterScript.setAttribute('src','https://platform.twitter.com/widgets.js')
twitterScript.onload = () => {
// Delay reveal for dom update
setInterval(() => {
this.visible = true
}, 850)
}
document.head.appendChild(twitterScript)
// Reveal after 200ms
setInterval(() => {
this.visible = true
}, 750)
// setInterval(() => {
// this.visible = true
// }, 750)
}
}
}