Chrome浏览器扩展开发思路
Chrome浏览器扩展开发系列之五:Page Action类型的Chrome浏览器扩展
1.点击Page Action的图标绑定事件使用
chrome.pageAction.onClicked.addListener(function (tab) {…})方法。
控制Page Action的图标显示使用chrome.pageAction.show(integer tabId)方法。
控制Page Action的图标隐藏使用chrome.pageAction.hide(integer tabId)方法。
参考:https://www.cnblogs.com/champagne/p/4810707.html