summaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/api.js4
-rw-r--r--ext/bg/js/backend.js2
-rw-r--r--ext/bg/js/context.js4
-rw-r--r--ext/bg/js/translator.js2
4 files changed, 6 insertions, 6 deletions
diff --git a/ext/bg/js/api.js b/ext/bg/js/api.js
index 93d9c155..999ea337 100644
--- a/ext/bg/js/api.js
+++ b/ext/bg/js/api.js
@@ -153,7 +153,7 @@ async function apiCommandExec(command, params) {
}
apiCommandExec.handlers = {
search: async (params) => {
- const url = chrome.extension.getURL('/bg/search.html');
+ const url = chrome.runtime.getURL('/bg/search.html');
if (!(params && params.newTab)) {
try {
const tab = await apiFindTab(1000, (url2) => (
@@ -181,7 +181,7 @@ apiCommandExec.handlers = {
chrome.runtime.openOptionsPage();
} else {
const manifest = chrome.runtime.getManifest();
- const url = chrome.extension.getURL(manifest.options_ui.page);
+ const url = chrome.runtime.getURL(manifest.options_ui.page);
chrome.tabs.create({url});
}
},
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index f29230a2..23d876f6 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -45,7 +45,7 @@ class Backend {
const options = this.getOptionsSync(this.optionsContext);
if (options.general.showGuide) {
- chrome.tabs.create({url: chrome.extension.getURL('/bg/guide.html')});
+ chrome.tabs.create({url: chrome.runtime.getURL('/bg/guide.html')});
}
this.isPreparedResolve();
diff --git a/ext/bg/js/context.js b/ext/bg/js/context.js
index 8e1dbce6..3fb27f0d 100644
--- a/ext/bg/js/context.js
+++ b/ext/bg/js/context.js
@@ -55,8 +55,8 @@ $(document).ready(utilAsync(() => {
const manifest = chrome.runtime.getManifest();
- setupButtonEvents('.action-open-search', 'search', chrome.extension.getURL('/bg/search.html'));
- setupButtonEvents('.action-open-options', 'options', chrome.extension.getURL(manifest.options_ui.page));
+ setupButtonEvents('.action-open-search', 'search', chrome.runtime.getURL('/bg/search.html'));
+ setupButtonEvents('.action-open-options', 'options', chrome.runtime.getURL(manifest.options_ui.page));
setupButtonEvents('.action-open-help', 'help');
const optionsContext = {
diff --git a/ext/bg/js/translator.js b/ext/bg/js/translator.js
index ee012d96..9d90136b 100644
--- a/ext/bg/js/translator.js
+++ b/ext/bg/js/translator.js
@@ -31,7 +31,7 @@ class Translator {
}
if (!this.deinflector) {
- const url = chrome.extension.getURL('/bg/lang/deinflect.json');
+ const url = chrome.runtime.getURL('/bg/lang/deinflect.json');
const reasons = await requestJson(url, 'GET');
this.deinflector = new Deinflector(reasons);
}