Fix: injectResource -> injectContent

This commit is contained in:
eight 2017-09-12 18:28:16 +08:00
parent 6ce4af8952
commit 8207d608be
2 changed files with 4 additions and 4 deletions

View File

@ -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}));

View File

@ -231,7 +231,7 @@ function createSourceLoader() {
function initUsercssInstall() {
pendingResource = communicate({
method: 'injectResource',
method: 'injectContent',
resources: [
'/js/dom.js',
'/js/localization.js',