Fix: inject all scripts

This commit is contained in:
eight 2018-10-08 14:39:08 +08:00
parent f4651da8d8
commit 582e9078af

View File

@ -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}) => {