views:

73

answers:

2

The Independent website has a little widget that pops up a message informing you that there is an Independent Chrome extension available when you visit it using Chrome (v7 in my case):

Is this part of the Chrome extensions API - if so how is it achieved (or have they custom-rolled their own JavaScript to make it look like part of Chrome)? A quick look at the source of the page revealed nothing obvious.

+2  A: 

Looks like custom-rolled markup:

<div id="ext_toolbar_text" style="padding-top: 11px; padding-right: 10px; padding-bottom: 10px; padding-left: 38px;
    background-image: url(http://assets.idiomag.com/ext/toolbar/icon.png); background-attachment: initial;
    background-origin: initial; background-clip: initial; background-color: initial; overflow-x: hidden;
    overflow-y: hidden; white-space: nowrap; -webkit-user-select: none; cursor: default; width: 977px;
    background-position: 5px 5px; background-repeat: no-repeat no-repeat;">
        The Independent now has a
        <span id="ext_toolbar_link" style="text-decoration: underline; color: rgb(75, 104, 156); cursor: pointer;">
        Google Chrome Extension</span>. Get the latest news on the topics you like, direct to your browser.
</div>

I selected "Inspect element" on the toolbar to get this.

Michael Petrotta
I had seen that, but could not find the JavaScript that tied into it. Wasn't sure whether Chrome inserts HTML into the current page when it adds these type of pop-ups or not.
adrianbanks
I see a click handler on that toolbar - that may be worth investigating.
Michael Petrotta
+3  A: 

I hate to be a party pooper but have you considered whether that's the right approach? Trying to fake something that the browser chrome normally does for you is generally considered to be the approach of phishers.

Could you find some way of advertising your extension that fits in better with the design of your site?

Dominic Mitchell
My question was about whether this is part of the chrome api, and if so, how is it done. If it is not part of the api, then I think it is a horrible way to promote an extension.
adrianbanks
_phew_ — glad we're in violent agreement then. :)
Dominic Mitchell

related questions