From 8207d608bef681d23bc7e706482a9af7887f663e Mon Sep 17 00:00:00 2001 From: eight Date: Tue, 12 Sep 2017 18:28:16 +0800 Subject: [PATCH] Fix: injectResource -> injectContent --- background/background.js | 6 +++--- content/install-user-css.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/background/background.js b/background/background.js index f76d0424..678c77d0 100644 --- a/background/background.js +++ b/background/background.js @@ -323,13 +323,13 @@ function onRuntimeMessage(request, sender, sendResponse) { .catch(() => sendResponse(null)); return KEEP_CHANNEL_OPEN; - case 'injectResource': - injectResource(request, sender.tab.id).then(sendResponse); + case 'injectContent': + injectContent(request, sender.tab.id).then(sendResponse); return KEEP_CHANNEL_OPEN; } } -function injectResource({resources}, tabId) { +function injectContent({resources}, tabId) { return Promise.all(doInject()) .then(() => ({status: 'success'})) .catch(err => ({status: 'error', error: err.message})); diff --git a/content/install-user-css.js b/content/install-user-css.js index 512c8785..ec3aaeb5 100644 --- a/content/install-user-css.js +++ b/content/install-user-css.js @@ -231,7 +231,7 @@ function createSourceLoader() { function initUsercssInstall() { pendingResource = communicate({ - method: 'injectResource', + method: 'injectContent', resources: [ '/js/dom.js', '/js/localization.js',