【问题标题】:Is there a way to add to my html the "chrome.extension" library/reference/class有没有办法将“chrome.extension”库/参考/类添加到我的 html
【发布时间】:2012-10-29 22:45:09
【问题描述】:

当我查看 Chrome 扩展插件时,有一个名为 Chrome.extension 的类或类似的东西

例如:

chrome.extension.onRequest.addListener(function(request, sender, response) {
  if (request.msg == 'page_capturable') {
    $('tip').style.display = 'none';
    $('capture........
    ........................
    ........................

The URL for the example

如您所见,此 chrome.extension 中有几个函数,例如 onRequestgetBackgroundPage() 和其他函数...

我检查了 Firefox 浏览器,它也支持这个 chrome.extension...

我想尝试将这个类添加到我的 html 文件中,以使用 JavaScript 或类似的东西启用此功能

我将尝试在 Internet Explorer 中使用它。

有没有人可以让我了解这个话题? 也许是一个 URL 或它自己的包?

顺便说一句:我使用了 google chrome 扩展并设法将其转换为 Firefox 这是我证明 Firefox 支持这个 chrome.extension 的证据 Chrome on Firefox

【问题讨论】:

    标签: javascript browser google-chrome-extension cross-browser firefox-addon


    【解决方案1】:

    我找到了 chrome.extension 库。 google 分享为 JS 文件

    大部分函数都在那里,还有几个空函数:(

    希望对某人有所帮助...

    http://closure-compiler.googlecode.com/svn/trunk/contrib/externs/chrome_extensions.js

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-11-30
      • 2015-04-02
      • 2020-12-31
      • 2013-02-27
      • 1970-01-01
      相关资源
      最近更新 更多