mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Trigger twitter button fade on script load
This commit is contained in:
parent
3f5f0eb764
commit
b12daa87b1
1 changed files with 11 additions and 3 deletions
|
|
@ -57,13 +57,21 @@ export default {
|
||||||
twitterScript.setAttribute('async','true')
|
twitterScript.setAttribute('async','true')
|
||||||
twitterScript.setAttribute('src','https://platform.twitter.com/widgets.js')
|
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)
|
document.head.appendChild(twitterScript)
|
||||||
|
|
||||||
|
|
||||||
// Reveal after 200ms
|
// Reveal after 200ms
|
||||||
setInterval(() => {
|
// setInterval(() => {
|
||||||
this.visible = true
|
// this.visible = true
|
||||||
}, 750)
|
// }, 750)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue