Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome inline extension on verified site throws error: No Chrome Web Store item link found

I have followed the deployment instruction of an inline installation of my extension on a site that I have verified.

<link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/jakgfopmadhihjajjegmbnaiimjbmdlk">

And for the button:

<a href="javascript:chrome.webstore.install();">Install me</a>

But when I press the button i get this strange error:

Uncaught No Chrome Web Store item link found. 
like image 206
osvathrobi Avatar asked May 23 '13 15:05

osvathrobi


1 Answers

I know the question is very old but in case if someone else is facing:

You need to provide the URL and call back functions in the function chrome.webstore.install().

Here is the code:

in the <head> put <link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/jakgfopmadhihjajjegmbnaiimjbmdlk">

and call via javascript:

chrome.webstore.install('https://chrome.google.com/webstore/detail/jakgfopmadhihjajjegmbnaiimjbmdlk', 
    function(d){
       console.log('installed')
    },
    function(e){
       console.log('not installed: '+ e)
    });

Source: https://developer.chrome.com/webstore/inline_installation

like image 178
SamFast Avatar answered Oct 13 '22 06:10

SamFast