Fix: injectResource -> injectContent
This commit is contained in:
parent
6ce4af8952
commit
8207d608be
|
@ -323,13 +323,13 @@ function onRuntimeMessage(request, sender, sendResponse) {
|
||||||
.catch(() => sendResponse(null));
|
.catch(() => sendResponse(null));
|
||||||
return KEEP_CHANNEL_OPEN;
|
return KEEP_CHANNEL_OPEN;
|
||||||
|
|
||||||
case 'injectResource':
|
case 'injectContent':
|
||||||
injectResource(request, sender.tab.id).then(sendResponse);
|
injectContent(request, sender.tab.id).then(sendResponse);
|
||||||
return KEEP_CHANNEL_OPEN;
|
return KEEP_CHANNEL_OPEN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function injectResource({resources}, tabId) {
|
function injectContent({resources}, tabId) {
|
||||||
return Promise.all(doInject())
|
return Promise.all(doInject())
|
||||||
.then(() => ({status: 'success'}))
|
.then(() => ({status: 'success'}))
|
||||||
.catch(err => ({status: 'error', error: err.message}));
|
.catch(err => ({status: 'error', error: err.message}));
|
||||||
|
|
|
@ -231,7 +231,7 @@ function createSourceLoader() {
|
||||||
|
|
||||||
function initUsercssInstall() {
|
function initUsercssInstall() {
|
||||||
pendingResource = communicate({
|
pendingResource = communicate({
|
||||||
method: 'injectResource',
|
method: 'injectContent',
|
||||||
resources: [
|
resources: [
|
||||||
'/js/dom.js',
|
'/js/dom.js',
|
||||||
'/js/localization.js',
|
'/js/localization.js',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user