OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script> | 3 <script> |
4 // Called when the user clicks on the browser action. | 4 // Called when the user clicks on the browser action. |
5 chrome.browserAction.onClicked.addListener(function(windowId) { | 5 chrome.browserAction.onClicked.addListener(function(tab) { |
6 chrome.tabs.getSelected(windowId, function(tab) { | 6 var action_url = "javascript:window.print();"; |
7 var action_url = "javascript:window.print();"; | 7 chrome.tabs.update(tab.id, {url: action_url}); |
8 chrome.tabs.update(tab.id, {url: action_url}); | |
9 }); | |
10 }); | 8 }); |
11 </script> | 9 </script> |
12 </head> | 10 </head> |
13 </html> | 11 </html> |
14 | 12 |
OLD | NEW |