Google Chrome扩展浏览器&页面操作 [英] Google chrome extension browser & page action

查看:131
本文介绍了Google Chrome扩展浏览器&页面操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在已经实现了browser_action的扩展中添加page_action?



我想使用browser_action显示一个弹出列表书签,同时使用page_action为用户提供书签当前页面的方式并将其加载到列表中。 只有应用 browser_action page_action 主题直到您的清单。因此,您不能将浏览器操作页面操作放在一起。

  //选择一个(或没有)
browser_action:{...},
page_action:{...},
theme:{...},
app:{...},



解决方法



使用两个不同的扩展和

参考文献




Is there a way to add a page_action in an extension that already implements browser_action?

I'd like to use the browser_action to display a popup with a list of bookmarks while use the page_action to give the user a way to bookmark the current page and load it in the list.

解决方案

You can only have one among app, browser_action, page_action and theme in your manifest till date. So, you can not have browser action and page action together.

// Pick one (or none)
  "browser_action": {...},
  "page_action": {...},
  "theme": {...},
  "app": {...},

Work Around

Use two different Extensions with cross extension message communication.

References

这篇关于Google Chrome扩展浏览器&页面操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆