15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved. 25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file. 45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Called when the user clicks on the browser action. 65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)chrome.browserAction.onClicked.addListener(function(tab) { 75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) var action_url = "javascript:window.print();"; 85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) chrome.tabs.update(tab.id, {url: action_url}); 95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}); 10