INNER CODE UNIT · JavaScript

showNotificationInTab

jatinkrmalik/LLMFeeder · extension/background.js:322

async function showNotificationInTab(title, message) {
  try {
    const tabs = await browserAPI.tabs.query({ active: true, currentWindow: true });
    if (!tabs || !tabs.length) return;

    const tab = tabs[0];

    // Send message to content script to show notification
    await browserAPI.tabs.sendMessage(tab.id, {
      action: 'showNotification',
      title: title,
      message: message
    });
  } catch (error) {
    console.error('Failed to show notification:', error);
  }
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…