如何构建Google环聊等Chrome扩展程序 [英] How to build an chrome extension like Google Hangouts

查看:97
本文介绍了如何构建Google环聊等Chrome扩展程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google环聊扩展程序有一个在Chrome用户界面外显示的面板。

它有点像通知,但不是。我在扩展程序开发人员文档中没有看到描述API的任何内容。这是一个Google特定的黑客攻击吗?在实验性API中是否存在某些缺失的内容?

解决方案

它是。确保您将 type 设置为面板

  chrome.windows.create({url:'https://mobile.twitter.com/',type:'panel'});在所有平台上可能不支持

面板您可能必须在Chrome标记 chrome:// flags /#enable-panels 中专门启用面板。


The Google Hangouts extension has a panel that shows up outside of the Chrome UI.

It is sort of like a notification but not. I don't see anything in the Extension Developer Docs that describes an API to make this work. Is this a Google-specific hack they're doing? Is there something in the experimental APIs that I'm missing?

解决方案

It is an options of chrome.windows.create. Make sure you set type to panel.

chrome.windows.create({ url: 'https://mobile.twitter.com/', type: 'panel' });

panel may not be supported on all platforms and you may have to specifically enable panels in Chrome Flags chrome://flags/#enable-panels.

这篇关于如何构建Google环聊等Chrome扩展程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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