警告网站访问者可以使用Chrome扩展程序 - 如何?

adr*_*nks 3 google-chrome google-chrome-extension

独立网站有一个小部件弹出一条消息,告知你,当你访问它使用Chrome(在我的情况下,第7版)有一个独立的浏览器扩展程序可供选择:

这是Chrome扩展程序API的一部分 - 如果是这样,它是如何实现的(或者让他们自定义自己的JavaScript以使其看起来像Chrome的一部分)?快速浏览一下页面的来源,没有发现任何明显的结果.

Mic*_*tta 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>
Run Code Online (Sandbox Code Playgroud)

我在工具栏上选择了"Inspect element"来获取它.


Dom*_*ell 5

我讨厌做派对,但是你考虑过这是否是正确的做法?试图伪造浏览器chrome通常为您做的事情通常被认为是网络钓鱼者的方法.

您能否找到一些方法来宣传您的扩展程序,以便更好地适应您网站的设计?