function localizeHtmlPage() {
  const elements = document.querySelectorAll('[data-i18n]');
  elements.forEach(el => {
    const key = el.getAttribute('data-i18n');
    const message = chrome.i18n.getMessage(key);
    if (message) {
      el.textContent = message;
    }
  });
}

// 调用本地化替换
localizeHtmlPage();

document.getElementById("submit").addEventListener("click", async () => {
  chrome.tabs.create({ url: "https://www.glamourshop.me" });
});