Reputation: 2837
When I visit some websites, on top of the browser it promotes me to install Chrome Extension by saying "This website now has Google Chrome Extension... Install
".
Anyone knows how to do this? Does Google already provide scripts to do this?
Example: Visit the following site using Chrome: http://www.independent.co.uk
Upvotes: 4
Views: 6812
Reputation: 3614
As of 06/12/2018, inline installation is deprecated. For more information, read our Chromium Blog post and Migration FAQ.
From: https://developer.chrome.com/webstore/inline_installation
Upvotes: 0
Reputation: 2565
Now, it's possible to do what you need. Just follow this link, that explains how to use "inline" installation once you've published your app or extension at Chrome Webstore.
PS. Inline installation only works in Chrome 15+
Upvotes: 7
Reputation: 156
From Chrome 15 there is API for this.
Just ask Chrome if your extension is installed.
Upvotes: 1
Reputation: 107940
I wrote a jQuery extension that does just that: http://blog.dreasgrech.com/2012/01/promoting-your-chrome-extension-with.html
The simplest way to use it is to simply pass the ID of your Chrome extension:
$.fn.extInfobar({
id: 'nbilgjjflfiiijecdjpnbganoiafneph'
});
That generates the following:
Upvotes: 1
Reputation: 6169
What you're seeing is not built into Chrome, and not provided by Google.
The site will have some code that detects your browser agent (either via Javascript or a server-side script), sees that it's Chrome, and then adds some extra HTML/CSS/Javascript to make a mock UI element to grab your attention. Inspect the element to see what's really happening.
Another example is http://page2rss.com/page?url=www.stackoverflow.com/
Also, see Alerting website visitors that a chrome extension is available - how?
Upvotes: 2
Reputation: 5143
Paul Kinlan's Badgemator is a good resource for this sort of thing. It creates a JavaScript snippet that you can put on your site in order to direct users to the webstore entry.
It doesn't attempt to mimic Chrome's infobar in the same way that The Independent does, but I personally think that's a good thing. Pretending to be part of the browser is a good way to confuse users, and isn't something I'd recommend (especially now that the infobar extends outside the browser window into Chrome's own UI).
Upvotes: 2
Reputation: 4786
You need to publish your extension in Google Chrome Extensions site, then you'll be able to publish it in your site.
You'll need to pay a one-time fee ($5) in order to get registered as a developer.
Upvotes: 0