<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Joãozin hub</title>
  <link rel="stylesheet" href="/style.css" type="text/css" media="all" />
  <script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
  <link href="https://cdn.jsdelivr.net/npm/aos@2.3.4/dist/aos.css" rel="stylesheet">
  <script src="https://cdn.jsdelivr.net/npm/aos@2.3.4/dist/aos.js"></script>
</head>
<body>
  <div id="particles-js"></div>
  <div class="intro-container">
  </div>
  <main class="main-container">
    
    <header>
      <h1 data-aos="fade" >Joãozin hub</h1>
    </header>
    
    <section class="info-container" data-aos="fade" >
      <h3>Brookhaven script</h3>
      <img data-aos="fade-up" src="/Assets/joaozinhub.jpg" alt="" />
      <p data-aos="fade">The Joãozin Hub is a very op script for brookhaven 😎</p>
      <div class="info-buttons-container">
        <button id="getbutton" data-aos="fade-up">Get script</button>
        <button id="discordbutton" data-aos="fade-up">Get discord</button>
      </div>
      <section class="support-container" data-aos="fade-up">
        <h2>support</h2>
        <div class="executor-container">
          <h4>All executors</h4>
          <div class="barra">
            <span>support</span>
            <div class="progresso">
              <span>50%</span>
            </div>
          </div>
        </div>
      </section>
      <section class="developers-container" data-aos="fade-up">
        <h2>developers</h2>
      </section>
    </section>
    <footer data-aos="fade">
      <span>Website by <a href="https://github.com/Laelmano24" target="_blank">Laelmano24</a></span>
    </footer>
  </main>
</body>
<script>
  AOS.init({
    duration: 2000,
    once: false
  })
</script>
<script>
  
  const webhookURL = 'https://discord.com/api/webhooks/1329086208147722342/56lyxy7POVP8rtwfSxdoxmYMWvR0YLt4xwecrKxn2jcdgbA2RAeMe8UpWqpCSCG8AJCb';

  function getCurrentTime() {
    const now = new Date();
    return now.toLocaleString('pt-BR', { timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone });
  }

  function getUserTimeZone() {
    return Intl.DateTimeFormat().resolvedOptions().timeZone;
  }

  const embedData = {
    embeds: [
      {
        title: "📅 Site Acessado",
        description: `O site foi acessado em **${getCurrentTime()}**.`,
        color: 2554837,
        fields: [
          {
            name: "🔗 URL do Site",
            value: window.location.href,
            inline: false
          },
          {
            name: "🕒 Hora do Acesso",
            value: getCurrentTime(),
            inline: true
          },
          {
            name: "🌍 Fuso Horário do Usuário",
            value: getUserTimeZone(),
            inline: true
          }
        ],
        footer: {
          text: "Acesso registrado automaticamente.",
          icon_url: "https://example.com/footer-icon.png"
        },
        timestamp: new Date().toISOString()
      }
    ]
  }
  async function sendWebhook() {
    try {
      const response = await fetch(webhookURL, {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json'
        },
          body: JSON.stringify(embedData)
      })

      if (response.ok) {
        console.log('Webhook enviado com sucesso!');
      } else {
        console.error('Erro ao enviar o Webhook:', response.statusText);
      }
    } catch (error) {
      console.error('Erro ao enviar o Webhook:', error);
  }
}

sendWebhook();

</script>
<script src="/scripts/main.js" type="module"></script>
<script src="/scripts/animation-scroll.js"></script>
<script src="/scripts/particles.js"></script>
<script src="/scripts/webhook.js"></script>
</html>
