aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-02-12 23:03:15 -0500
committerGitHub <noreply@github.com>2021-02-12 23:03:15 -0500
commit4053d9b2fac82108f701788c511aedaf988de4c5 (patch)
tree0076ba6c17234651788b1e8421b5d71a9e33cb8d /ext/bg/js
parent4f13de283572b2c57e7462f1030c12fe8335882e (diff)
Move html files (#1375)
* Move background.html to / * Move context.html to / * Move info.html to / * Move legal.html to / * Move permissions.html to / * Move pitch-accents-preview.html to / * Move popup-preview.html to / * Move search.html to / * Move settings.html to / * Move settings2.html to / * Move template-renderer.html to / * Move welcome.html to / * Move float.html to / * Move display-templates.html to /
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/backend.js14
-rw-r--r--ext/bg/js/context-main.js8
-rw-r--r--ext/bg/js/settings/popup-preview-controller.js2
-rw-r--r--ext/bg/js/template-renderer-proxy.js2
4 files changed, 13 insertions, 13 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index a1f5e6d1..2fb290bb 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -559,7 +559,7 @@ class Backend {
}
async _onApiGetDisplayTemplatesHtml() {
- return await this._fetchAsset('/mixed/display-templates.html');
+ return await this._fetchAsset('/display-templates.html');
}
_onApiGetZoom(params, sender) {
@@ -678,7 +678,7 @@ class Backend {
}
async _onApiIsTabSearchPopup({tabId}) {
- const baseUrl = chrome.runtime.getURL('/bg/search.html');
+ const baseUrl = chrome.runtime.getURL('/search.html');
const tab = typeof tabId === 'number' ? await this._checkTabUrl(tabId, (url) => url.startsWith(baseUrl)) : null;
return (tab !== null);
}
@@ -728,7 +728,7 @@ class Backend {
async _onCommandOpenSearchPage(params) {
const {mode='existingOrNewTab', query} = params || {};
- const baseUrl = chrome.runtime.getURL('/bg/search.html');
+ const baseUrl = chrome.runtime.getURL('/search.html');
const queryParams = {};
if (query && query.length > 0) { queryParams.query = query; }
const queryString = new URLSearchParams(queryParams).toString();
@@ -822,7 +822,7 @@ class Backend {
async _getOrCreateSearchPopup2() {
// Reuse same tab
- const baseUrl = chrome.runtime.getURL('/bg/search.html');
+ const baseUrl = chrome.runtime.getURL('/search.html');
if (this._searchPopupTabId !== null) {
const tab = await this._checkTabUrl(this._searchPopupTabId, (url) => url.startsWith(baseUrl));
if (tab !== null) {
@@ -1821,17 +1821,17 @@ class Backend {
}
async _openWelcomeGuidePage() {
- await this._createTab(chrome.runtime.getURL('/bg/welcome.html'));
+ await this._createTab(chrome.runtime.getURL('/welcome.html'));
}
async _openInfoPage() {
- await this._createTab(chrome.runtime.getURL('/bg/info.html'));
+ await this._createTab(chrome.runtime.getURL('/info.html'));
}
async _openSettingsPage(mode) {
const {useSettingsV2} = this._options.global;
const manifest = chrome.runtime.getManifest();
- const url = chrome.runtime.getURL(useSettingsV2 ? '/bg/settings2.html' : manifest.options_ui.page);
+ const url = chrome.runtime.getURL(useSettingsV2 ? '/settings.html' : manifest.options_ui.page);
switch (mode) {
case 'existingOrNewTab':
if (useSettingsV2) {
diff --git a/ext/bg/js/context-main.js b/ext/bg/js/context-main.js
index a7ea1471..98716958 100644
--- a/ext/bg/js/context-main.js
+++ b/ext/bg/js/context-main.js
@@ -32,17 +32,17 @@ class DisplayController {
this._showExtensionInfo(manifest);
this._setupEnvironment();
- this._setupButtonEvents('.action-open-search', 'openSearchPage', chrome.runtime.getURL('/bg/search.html'));
- this._setupButtonEvents('.action-open-info', 'openInfoPage', chrome.runtime.getURL('/bg/info.html'));
+ this._setupButtonEvents('.action-open-search', 'openSearchPage', chrome.runtime.getURL('/search.html'));
+ this._setupButtonEvents('.action-open-info', 'openInfoPage', chrome.runtime.getURL('/info.html'));
const optionsFull = await api.optionsGetFull();
this._optionsFull = optionsFull;
this._setupHotkeys();
- const optionsPageUrl = optionsFull.global.useSettingsV2 ? '/bg/settings2.html' : manifest.options_ui.page;
+ const optionsPageUrl = optionsFull.global.useSettingsV2 ? '/settings.html' : manifest.options_ui.page;
this._setupButtonEvents('.action-open-settings', 'openSettingsPage', chrome.runtime.getURL(optionsPageUrl));
- this._setupButtonEvents('.action-open-permissions', null, chrome.runtime.getURL('/bg/permissions.html'));
+ this._setupButtonEvents('.action-open-permissions', null, chrome.runtime.getURL('/permissions.html'));
const {profiles, profileCurrent} = optionsFull;
const primaryProfile = (profileCurrent >= 0 && profileCurrent < profiles.length) ? profiles[profileCurrent] : null;
diff --git a/ext/bg/js/settings/popup-preview-controller.js b/ext/bg/js/settings/popup-preview-controller.js
index 06939bb4..f98b0679 100644
--- a/ext/bg/js/settings/popup-preview-controller.js
+++ b/ext/bg/js/settings/popup-preview-controller.js
@@ -80,7 +80,7 @@ class PopupPreviewController {
customOuterCss.addEventListener('input', this._onCustomOuterCssChange.bind(this), false);
this._settingsController.on('optionsContextChanged', this._onOptionsContextChange.bind(this));
- frame.src = '/bg/popup-preview.html';
+ frame.src = '/popup-preview.html';
frame.id = 'settings-popup-preview-frame';
container.appendChild(frame);
diff --git a/ext/bg/js/template-renderer-proxy.js b/ext/bg/js/template-renderer-proxy.js
index 21d45a94..6a49832b 100644
--- a/ext/bg/js/template-renderer-proxy.js
+++ b/ext/bg/js/template-renderer-proxy.js
@@ -21,7 +21,7 @@ class TemplateRendererProxy {
this._frameNeedsLoad = true;
this._frameLoading = false;
this._frameLoadPromise = null;
- this._frameUrl = chrome.runtime.getURL('/bg/template-renderer.html');
+ this._frameUrl = chrome.runtime.getURL('/template-renderer.html');
this._invocations = new Set();
}