Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1753

Buy Me Coffee Script Tag in Svelte

$
0
0

How can i add this buymecoffee script tag in svelte.

  type="text/javascript"  src="https://cdnjs.buymeacoffee.com/1.0.0/button.prod.min.js"  data-name="bmc-button"  data-slug="slug_name"  data-color="#FFDD00"  data-emoji="☕"  data-font="Lato"  data-text="Buy me a coffee"  data-outline-color="#000000"  data-font-color="#000000"  data-coffee-color="#ffffff"></script>;

I already have another script tag in my page like this:

<script lang='ts'>    import { onMount } from 'svelte';    let sectionsVisible = [false, false, false, false];    function handleScroll() {      const sections = document.querySelectorAll('section');      sections.forEach((section, index) => {        const rect = section.getBoundingClientRect();        if (rect.top < window.innerHeight * 0.75) {          sectionsVisible[index] = true;        }      });    }    onMount(() => {      handleScroll();      window.addEventListener('scroll', handleScroll);    });</script>

How can I combine those two script tag in one page. And is there any chance to place buymecoffee button to where I want?


Viewing all articles
Browse latest Browse all 1753

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>