OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 chrome.tabs.getSelected(null, function(tab) { |
| 6 chrome.pageAction.show(tab.id); |
| 7 |
| 8 // When the page action icon is clicked for the first time, add a popup. |
| 9 chrome.pageAction.onClicked.addListener(function(tab) { |
| 10 window.tabId = tab.id; |
| 11 |
| 12 chrome.pageAction.setPopup({ |
| 13 tabId: tab.id, |
| 14 popup: 'a_popup.html' |
| 15 }); |
| 16 chrome.test.notifyPass(); |
| 17 }); |
| 18 |
| 19 chrome.test.notifyPass(); |
| 20 }); |
OLD | NEW |