Skip to content

Commit

Permalink
Fix: inject all scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
eight04 committed Oct 8, 2018
1 parent f4651da commit 582e907
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions background/background.js
Expand Up @@ -268,12 +268,14 @@ window.addEventListener('storageReady', function _() {

const injectCS = (cs, tabId) => {
ignoreChromeError();
chrome.tabs.executeScript(tabId, {
file: cs.js[0],
runAt: cs.run_at,
allFrames: cs.all_frames,
matchAboutBlank: cs.match_about_blank,
}, ignoreChromeError);
for (const file of cs.js) {
chrome.tabs.executeScript(tabId, {
file,
runAt: cs.run_at,
allFrames: cs.all_frames,
matchAboutBlank: cs.match_about_blank,
}, ignoreChromeError);
}
};

const pingCS = (cs, {id, url}) => {
Expand Down

0 comments on commit 582e907

Please sign in to comment.