Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: ui/accessibility/extensions/alt/background.js

Issue 593293002: Initial checkin of accessibility extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix license issues Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 function injectScripts(opt_tab) {
6 chrome.tabs.executeScript({
7 file: 'lib/axs_testing.js',
8 allFrames: true
9 }, function() {
10 console.log('successfully injected axs_testing.js');
11 chrome.tabs.executeScript({
12 file: 'hide-images.js',
13 allFrames: true
14 }, function() {
15 console.log('successfully injected script', opt_tab ? opt_tab.url : '');
16 chrome.tabs.insertCSS({
17 file: 'hide-images.css',
18 allFrames: true
19 }, function() {
20 console.log('successfully injected css', opt_tab ? opt_tab.url : '');
21 chrome.tabs.executeScript({
22 code: 'toggleEnabled();',
23 allFrames: true
24 }, function() {
25 console.log('created infobar');
26 chrome.tabs.executeScript({
27 code: 'createInfobar();'
28 });
29 });
30 });
31 });
32 });
33 }
34
35 chrome.commands.onCommand.addListener(function(command) {
36 console.log('command: ', command);
37 if (command == 'example_keyboard_command') {
38 injectScripts();
39 }
40 });
41
42 chrome.browserAction.onClicked.addListener(function(tab) {
43 injectScripts(tab);
44 });
45
OLDNEW
« no previous file with comments | « ui/accessibility/extensions/README.chromium ('k') | ui/accessibility/extensions/alt/hide-images.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698