Commit 164a2ac8 authored by David Tseng's avatar David Tseng Committed by Commit Bot

Stop hard-coding content scripts injected at runtime

This fixes an issue where the path of the content script was updated
in the manifest but not in the js.

This is seen by the only remaining client of the ChromeVox api
(docs.google.com) where if the tab was open prior to ChromeVox being
enabled, enabling ChromeVox would not inject the scripts.

R=akihiroota@chromium.org

Bug: none
Change-Id: I0980f7cecac13f53a421e7788a47c372add5dbb6
AX-Relnotes: Fixes an issue where ChromeVox might not enable Google Docs accessibility.
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2461717Reviewed-by: default avatarAkihiro Ota <akihiroota@chromium.org>
Commit-Queue: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#815395}
parent 5540f5e7
......@@ -177,19 +177,8 @@ ChromeVoxBackground = class {
* injected.
*/
injectChromeVoxIntoTabs(tabs) {
let listOfFiles;
// These lists of files must match the content_scripts section in
// the manifest files.
if (COMPILED) {
listOfFiles = ['chromeVoxChromePageScript.js'];
} else {
listOfFiles = [
'closure/closure_preinit.js', 'closure/base.js', 'deps.js',
'chromevox/injected/loader.js'
];
}
const listOfFiles =
chrome.runtime.getManifest()['content_scripts'][0]['js'];
const stageTwo = function(code) {
for (let i = 0, tab; tab = tabs[i]; i++) {
window.console.log('Injecting into ' + tab.id, tab);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment