(function () {
  const upgradeLinks = document.querySelectorAll('#adminmenu .foodord-admin-menu-upgrade a');

  upgradeLinks.forEach((link) => {
    const href = link.getAttribute('href') || '';
    if (!href.startsWith('https://www.foodord.com/pricing/')) {
      return;
    }

    link.setAttribute('target', '_blank');
    link.setAttribute('rel', 'noopener noreferrer');
  });
}());
