const createTab = id => {
    browser.notifications.clear(id)
    browser.tabs.create({
        url: 'https://worldbrain.helprace.com/i34-feature-tagging',
    })
}

const updateNotification = () => {
    browser.notifications.create({
        type: 'basic',
        title: 'NEW FEATURE: Tagging',
        iconUrl: '/img/worldbrain-logo-narrow.png',
        message: 'Click for more Information',
        buttons: [{ title: 'Click for more Information' }],
    })

    browser.notifications.onButtonClicked.addListener((id, index) => {
        createTab(id)
    })

    browser.notifications.onClicked.addListener(id => {
        createTab(id)
    })
}

export default updateNotification

const createTab = id => {
    browser.notifications.clear(id)
    browser.tabs.create({
        url: 'https://worldbrain.helprace.com/i34-feature-tagging',
    })
}

const updateNotification = () => {
    browser.notifications.create({
        type: 'basic',
        title: 'NEW FEATURE: Tagging',
        iconUrl: '/img/worldbrain-logo-narrow.png',
        message: 'Click for more Information',
    })

    browser.notifications.onClicked.addListener(createTab)
}

export default updateNotification

Remove button from update notif
Remove button from update notif

- buttons aren't supported in FF notifs; error gets thrown
- this is documented: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/notifications/NotificationOptions
- this button also just did the same thing as notif click
