window.ETERNAL_BEINGS_SITE = Object.freeze({
  officialXUrl: "https://x.com/jennifer13wp7"
});

document.addEventListener("DOMContentLoaded", () => {
  const officialXUrl = String(window.ETERNAL_BEINGS_SITE?.officialXUrl || "").trim();
  const validOfficialXUrl = /^https:\/\/(?:www\.)?(?:x\.com|twitter\.com)\/[A-Za-z0-9_]+\/?$/i.test(officialXUrl);

  document.querySelectorAll('[data-official-link="x"]').forEach((link) => {
    if (!validOfficialXUrl) {
      link.hidden = true;
      return;
    }
    link.href = officialXUrl;
  });
});
