1 // Copyright 2014 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.
5 function injectScripts(opt_tab) {
6 chrome.tabs.executeScript({
7 file: 'lib/axs_testing.js',
10 console.log('successfully injected axs_testing.js');
11 chrome.tabs.executeScript({
12 file: 'hide-images.js',
15 console.log('successfully injected script', opt_tab ? opt_tab.url : '');
16 chrome.tabs.insertCSS({
17 file: 'hide-images.css',
20 console.log('successfully injected css', opt_tab ? opt_tab.url : '');
21 chrome.tabs.executeScript({
22 code: 'toggleEnabled();',
25 console.log('created infobar');
26 chrome.tabs.executeScript({
27 code: 'createInfobar();'
35 chrome.commands.onCommand.addListener(function(command) {
36 console.log('command: ', command);
37 if (command == 'example_keyboard_command') {
42 chrome.browserAction.onClicked.addListener(function(tab) {