Replace window.yomichan_backend with window.yomichanBackend
This commit is contained in:
parent
f8365b8092
commit
35216332bf
@ -41,7 +41,7 @@ function _apiInvoke(action, params={}) {
|
|||||||
reject(new Error(`${message} (${JSON.stringify(data)})`));
|
reject(new Error(`${message} (${JSON.stringify(data)})`));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const backend = window.yomichan_backend;
|
const backend = window.yomichanBackend;
|
||||||
backend.onMessage({action, params}, null, callback);
|
backend.onMessage({action, params}, null, callback);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
reject(e);
|
reject(e);
|
||||||
|
@ -702,5 +702,5 @@ Backend._commandHandlers = new Map([
|
|||||||
['toggle', (self, ...args) => self._onCommandToggle(...args)]
|
['toggle', (self, ...args) => self._onCommandToggle(...args)]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
window.yomichan_backend = new Backend();
|
window.yomichanBackend = new Backend();
|
||||||
window.yomichan_backend.prepare();
|
window.yomichanBackend.prepare();
|
||||||
|
@ -97,7 +97,7 @@ function utilStringHashCode(string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function utilBackend() {
|
function utilBackend() {
|
||||||
return chrome.extension.getBackgroundPage().yomichan_backend;
|
return chrome.extension.getBackgroundPage().yomichanBackend;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function utilAnkiGetModelNames() {
|
async function utilAnkiGetModelNames() {
|
||||||
|
Loading…
Reference in New Issue
Block a user