We have a Chrome extension download button on our site.
When you click it, it opens a popup that says 'Add extension', 'Cancel' etc.
The image shows the popup I'm referring to.
It works fine, except for the cancel button opens a new tab and takes you to the plugins chrome store page.
I have no idea why it does this, or how to just get it to cancel.
The js:
chrome.webstore.install(link, () => null, (error, errorCode) => {
if (errorCode !== 'userCanceled') {
window.open(link, '_blank');
}
});
}
I assumed the errorCode would be 'userCanceled' because the user hits the cancel button, so I excluded that. The list of errors are here: https://developer.chrome.com/extensions/webstore
Any help is much appreciated.
--
You received this message because you are subscribed to the Google Groups "Chromium-Extensions-Announce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at https://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/ec68d8fb-9fa4-4339-89b2-177ed4aee254%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.