function successCallback() {
window.alert('success');
}
function failureCallback() {
window.alert('failure');
}
function ExtInstall() {
if (chrome.app.isInstalled)
alert("already installed!");
else
chrome.webstore.install('https://chrome.google.com/webstore/detail/iblenkmcolcdonmlfknbpbgjebabcoae',
successCallback, failureCallback);
}
--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" 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 http://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/1cd13501-5836-4a26-9ab8-ec0785f63875%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.
Try following the example here: https://developer.chrome.com/webstore/inline_installation
On Wed, Sep 9, 2015 at 8:58 AM, Tuấn Trần <trananht...@gmail.com> wrote:
Hello, i have an extension and a website. I want to the user install my extension in my website, so i choose the way inline-installation to install my extension.This is my code JS to add extension:function successCallback() {
window.alert('success');
}
function failureCallback() {
window.alert('failure');
}
function ExtInstall() {
if (chrome.app.isInstalled)
alert("already installed!");
else
chrome.webstore.install('https://chrome.google.com/webstore/detail/iblenkmcolcdonmlfknbpbgjebabcoae',
successCallback, failureCallback);
}
When i click a button in website it's will call ExtInstall() function BUT i get an error: "uncaught Chrome Web Store installations can only be initated by a user gesture.". Can you tell me why i get this error? How can i fix it?Thanks!
--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extensions+unsub...@chromium.org.
Hi, thanks for reply! I have tried following this example but i get another error: "Uncaught Error: A Chrome Web Store installation is already pending". I have try in localhost website, is this problem? So, can you tell me other documnets, sample?
Vào 23:36:19 UTC+7 Thứ Tư, ngày 09 tháng 9 năm 2015, Antony Sargent đã viết:
Try following the example here: https://developer.chrome.com/webstore/inline_installation
On Wed, Sep 9, 2015 at 8:58 AM, Tuấn Trần <trananht...@gmail.com> wrote:
Hello, i have an extension and a website. I want to the user install my extension in my website, so i choose the way inline-installation to install my extension.This is my code JS to add extension:function successCallback() {
window.alert('success');
}
function failureCallback() {
window.alert('failure');
}
function ExtInstall() {
if (chrome.app.isInstalled)
alert("already installed!");
else
chrome.webstore.install('https://chrome.google.com/webstore/detail/iblenkmcolcdonmlfknbpbgjebabcoae',
successCallback, failureCallback);
}
When i click a button in website it's will call ExtInstall() function BUT i get an error: "uncaught Chrome Web Store installations can only be initated by a user gesture.". Can you tell me why i get this error? How can i fix it?Thanks!
--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" 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 http://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/1cd13501-5836-4a26-9ab8-ec0785f63875%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.
--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" 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 http://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/59504c92-2bfb-4bb2-b666-aed322ba987b%40chromium.org.