Skip to content

Commit

Permalink
Web: Changed install buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Xzensi committed Jun 18, 2024
1 parent 013f58e commit 542823e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ <h2>A Better Kick and 7TV Emote Extension for Kick.</h2>
class="button"
target="_blank"
rel="noopener"
>Install for Chrome & Edge</a
>Install for Chrome | Opera | Edge</a
>
<a href="/" class="button disabled" target="_blank" rel="noopener">Firefox (Coming soon)</a>
<a href="userscript.html" class="button">Get Userscript</a>
<a href="userscript.html" class="button">Install as Userscript</a>
</section>
<section>
<img src="img/emote_menu.png" alt="Emote menu" class="elevation-3" />
Expand Down Expand Up @@ -140,18 +140,21 @@ <h3>Follow us on Github</h3>

let clientWidth = document.body.clientWidth

const emotesBox = document.querySelector('#banner .emotes_box')
const createElement = document.createElement.bind(document)

function loop(width) {
if (width !== clientWidth) return

const emoji = emojis[(prng() * emojis.length) << 0]
const img = document.createElement('img')
const img = createElement('img')

img.src = `img/emotes/${emoji}.webp`
img.style.position = 'absolute'
img.style.left = `${prng() * 100}%`
img.addEventListener('animationend', img.remove)

document.querySelector('#banner .emotes_box').appendChild(img)
emotesBox.appendChild(img)

requestAnimationFrame(() => {
setTimeout(loop.bind(this, width), prng() * interval + interval / 2)
Expand Down

0 comments on commit 542823e

Please sign in to comment.