2010-10-03 18 views
3

Independent website有一个小部件弹出一条消息,告知您,当您使用Chrome(在我的情况V7)访问它有一个独立的浏览器扩展程序可供选择:提醒网站访问者有一个Chrome扩展可用 - 如何?

是的这部分Chrome扩展程序API - 如果是的话,它是如何实现的(或者他们是否定制了自己的JavaScript来使它看起来像Chrome的一部分)?快速浏览一下页面的来源并没有什么明显的。

回答

5

貌似定制轧标记:

<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> 

我选择了“检查元素”工具栏上的得到这个。

+0

我已经看到了,但找不到绑定到它的JavaScript。不确定当Chrome添加这些类型的弹出窗口时,Chrome是否将HTML插入到当前页面中。 – adrianbanks 2010-10-03 19:45:01

+0

我在该工具栏上看到一个点击处理程序 - 这可能值得调查。 – 2010-10-03 19:49:34

5

我讨厌成为派对狂,但你有没有考虑过这是否正确?试图伪造浏览器Chrome通常为你做的事通常被认为是钓鱼者的做法。

你能否找到某种方式来宣传你的扩展,这与你的网站的设计更合适?

+0

我的问题是关于这是否是chrome api的一部分,如果是的话,它是如何完成的。如果它不是api的一部分,那么我认为这是推广扩展的可怕方法。 – adrianbanks 2010-10-04 08:01:36

+0

_phew_ - 很高兴我们在暴力协议中。 :) – 2010-10-04 17:39:05

相关问题