aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev/data/manifest-variants.json16
-rw-r--r--ext/background.html (renamed from ext/bg/background.html)0
-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
-rw-r--r--ext/context.html (renamed from ext/bg/context.html)0
-rw-r--r--ext/display-templates.html (renamed from ext/mixed/display-templates.html)0
-rw-r--r--ext/fg/js/popup.js2
-rw-r--r--ext/float.html (renamed from ext/fg/float.html)0
-rw-r--r--ext/info.html (renamed from ext/bg/info.html)2
-rw-r--r--ext/legal.html (renamed from ext/bg/legal.html)0
-rw-r--r--ext/manifest.json12
-rw-r--r--ext/permissions.html (renamed from ext/bg/permissions.html)0
-rw-r--r--ext/pitch-accents-preview.html (renamed from ext/bg/pitch-accents-preview.html)0
-rw-r--r--ext/popup-preview.html (renamed from ext/bg/popup-preview.html)0
-rw-r--r--ext/search.html (renamed from ext/bg/search.html)0
-rw-r--r--ext/settings-old.html (renamed from ext/bg/settings.html)6
-rw-r--r--ext/settings.html (renamed from ext/bg/settings2.html)10
-rw-r--r--ext/template-renderer.html (renamed from ext/bg/template-renderer.html)0
-rw-r--r--ext/welcome.html (renamed from ext/bg/welcome.html)14
-rw-r--r--test/test-sw.js2
22 files changed, 45 insertions, 45 deletions
diff --git a/dev/data/manifest-variants.json b/dev/data/manifest-variants.json
index 7e7c6566..3bb17029 100644
--- a/dev/data/manifest-variants.json
+++ b/dev/data/manifest-variants.json
@@ -25,10 +25,10 @@
"128": "images/icon128.png"
},
"default_title": "Yomichan",
- "default_popup": "bg/context.html"
+ "default_popup": "context.html"
},
"background": {
- "page": "bg/background.html",
+ "page": "background.html",
"persistent": true
},
"content_scripts": [
@@ -66,12 +66,12 @@
],
"minimum_chrome_version": "57.0.0.0",
"options_ui": {
- "page": "bg/settings2.html",
+ "page": "settings.html",
"open_in_tab": true
},
"sandbox": {
"pages": [
- "bg/template-renderer.html"
+ "template-renderer.html"
],
"content_security_policy": "sandbox allow-scripts; default-src 'self'; script-src 'self' 'unsafe-eval'"
},
@@ -111,8 +111,8 @@
}
},
"web_accessible_resources": [
- "fg/float.html",
- "bg/template-renderer.html"
+ "float.html",
+ "template-renderer.html"
],
"content_security_policy": "default-src 'self'; style-src 'self' 'unsafe-inline'; media-src *; connect-src *"
},
@@ -174,7 +174,7 @@
{"action": "move", "path": ["web_accessible_resources_old"], "newPath": ["web_accessible_resources", 0, "resources"]}
],
"excludeFiles": [
- "bg/background.html",
+ "background.html",
"bg/js/native-simple-dom-parser.js"
]
},
@@ -185,7 +185,7 @@
{
"action": "remove",
"path": ["web_accessible_resources"],
- "item": "bg/template-renderer.html"
+ "item": "template-renderer.html"
},
{
"action": "delete",
diff --git a/ext/bg/background.html b/ext/background.html
index 101bd09c..101bd09c 100644
--- a/ext/bg/background.html
+++ b/ext/background.html
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();
}
diff --git a/ext/bg/context.html b/ext/context.html
index 1b0072a6..1b0072a6 100644
--- a/ext/bg/context.html
+++ b/ext/context.html
diff --git a/ext/mixed/display-templates.html b/ext/display-templates.html
index a470defa..a470defa 100644
--- a/ext/mixed/display-templates.html
+++ b/ext/display-templates.html
diff --git a/ext/fg/js/popup.js b/ext/fg/js/popup.js
index 5e15a654..b920caf7 100644
--- a/ext/fg/js/popup.js
+++ b/ext/fg/js/popup.js
@@ -256,7 +256,7 @@ class Popup extends EventDispatcher {
frame.removeAttribute('srcdoc');
this._observeFullscreen(true);
this._onFullscreenChanged();
- const url = chrome.runtime.getURL('/fg/float.html');
+ const url = chrome.runtime.getURL('/float.html');
if (useSecurePopupFrameUrl) {
frame.contentDocument.location.href = url;
} else {
diff --git a/ext/fg/float.html b/ext/float.html
index 0203043a..0203043a 100644
--- a/ext/fg/float.html
+++ b/ext/float.html
diff --git a/ext/bg/info.html b/ext/info.html
index 920f94a0..4dfe4c09 100644
--- a/ext/bg/info.html
+++ b/ext/info.html
@@ -47,7 +47,7 @@
<li>Information and downloadable dictionaries: <a href="https://foosoft.net/projects/yomichan/" rel="noreferrer noopener">Homepage</a></li>
<li>Source code, bug reporting, and feedback: <a href="https://github.com/FooSoft/yomichan" rel="noreferrer noopener">Github</a></li>
<li>Release notes: <a href="https://github.com/FooSoft/yomichan/releases" rel="noreferrer noopener" data-href-format="https://github.com/FooSoft/yomichan/releases/tag/{version}" id="release-notes-this-version-link">This version</a> | <a href="https://github.com/FooSoft/yomichan/releases" rel="noreferrer noopener">All versions</a></li>
- <li>More extension information: <a href="/bg/permissions.html">Permissions</a> | <a href="/bg/legal.html">Licenses</a></li>
+ <li>More extension information: <a href="/permissions.html">Permissions</a> | <a href="/legal.html">Licenses</a></li>
</ul>
</div></div></div></div>
</div>
diff --git a/ext/bg/legal.html b/ext/legal.html
index b8c1f1c5..b8c1f1c5 100644
--- a/ext/bg/legal.html
+++ b/ext/legal.html
diff --git a/ext/manifest.json b/ext/manifest.json
index 55535feb..233df081 100644
--- a/ext/manifest.json
+++ b/ext/manifest.json
@@ -24,10 +24,10 @@
"128": "images/icon128.png"
},
"default_title": "Yomichan",
- "default_popup": "bg/context.html"
+ "default_popup": "context.html"
},
"background": {
- "page": "bg/background.html",
+ "page": "background.html",
"persistent": true
},
"content_scripts": [
@@ -65,12 +65,12 @@
],
"minimum_chrome_version": "57.0.0.0",
"options_ui": {
- "page": "bg/settings2.html",
+ "page": "settings.html",
"open_in_tab": true
},
"sandbox": {
"pages": [
- "bg/template-renderer.html"
+ "template-renderer.html"
],
"content_security_policy": "sandbox allow-scripts; default-src 'self'; script-src 'self' 'unsafe-eval'"
},
@@ -110,8 +110,8 @@
}
},
"web_accessible_resources": [
- "fg/float.html",
- "bg/template-renderer.html"
+ "float.html",
+ "template-renderer.html"
],
"content_security_policy": "default-src 'self'; style-src 'self' 'unsafe-inline'; media-src *; connect-src *"
}
diff --git a/ext/bg/permissions.html b/ext/permissions.html
index 2ea9f2a1..2ea9f2a1 100644
--- a/ext/bg/permissions.html
+++ b/ext/permissions.html
diff --git a/ext/bg/pitch-accents-preview.html b/ext/pitch-accents-preview.html
index b2885c92..b2885c92 100644
--- a/ext/bg/pitch-accents-preview.html
+++ b/ext/pitch-accents-preview.html
diff --git a/ext/bg/popup-preview.html b/ext/popup-preview.html
index 5a8da859..5a8da859 100644
--- a/ext/bg/popup-preview.html
+++ b/ext/popup-preview.html
diff --git a/ext/bg/search.html b/ext/search.html
index a949beff..a949beff 100644
--- a/ext/bg/search.html
+++ b/ext/search.html
diff --git a/ext/bg/settings.html b/ext/settings-old.html
index 3e3f1961..aa20daf4 100644
--- a/ext/bg/settings.html
+++ b/ext/settings-old.html
@@ -23,7 +23,7 @@
<div class="alert alert-danger">
This is the old version of the settings page, it will be removed in the next version.
- Please use <a href="/bg/settings2.html">the new settings page</a>
+ Please use <a href="/settings.html">the new settings page</a>
and feel free to share any feedback
<a href="https://github.com/FooSoft/yomichan/issues/1000" target="_blank" rel="noopener noreferrer">on Github</a>.
</div>
@@ -212,7 +212,7 @@
</div>
<div class="checkbox options-advanced">
- <label><input type="checkbox" data-setting="global.useSettingsV2" data-scope="global"> Use the <a href="/bg/settings2.html">v2 settings page</a> by default</label>
+ <label><input type="checkbox" data-setting="global.useSettingsV2" data-scope="global"> Use the <a href="/settings.html">v2 settings page</a> by default</label>
</div>
<div class="form-group">
@@ -1269,7 +1269,7 @@
</div>
<div class="pull-right bottom-links">
- <small><span id="extension-info"></span> &bull; <a href="search.html">Search</a> &bull; <a href="https://foosoft.net/projects/yomichan/" target="_blank" rel="noopener">Homepage</a> &bull; <a href="legal.html">Legal</a></small>
+ <small><span id="extension-info"></span> &bull; <a href="/search.html">Search</a> &bull; <a href="https://foosoft.net/projects/yomichan/" target="_blank" rel="noopener">Homepage</a> &bull; <a href="/legal.html">Legal</a></small>
</div>
</div>
diff --git a/ext/bg/settings2.html b/ext/settings.html
index d0ba0b3c..6e35e818 100644
--- a/ext/bg/settings2.html
+++ b/ext/settings.html
@@ -49,7 +49,7 @@
}'
><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
</span><span class="outline-item-label">Advanced</span></label>
- <a href="/bg/info.html" class="outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="question-mark"></span></span><span class="outline-item-label">About Yomichan</span></a>
+ <a href="/info.html" class="outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="question-mark"></span></span><span class="outline-item-label">About Yomichan</span></a>
</div>
</div></div>
</div>
@@ -67,7 +67,7 @@
<div class="settings-item-label">
<strong>Notice:</strong>
This settings page is planned to replace
- <a href="/bg/settings.html">the old settings page</a>.<br>
+ <a href="/settings-old.html">the old settings page</a>.<br>
Questions, comments, and other feedback is welcome and can be shared
<a href="https://github.com/FooSoft/yomichan/issues/1000" target="_blank" rel="noopener noreferrer">on Github</a>.
</div>
@@ -214,7 +214,7 @@
</div></div>
<div class="settings-item"><div class="settings-item-inner">
<div class="settings-item-left">
- <div class="settings-item-label">Show the <a href="welcome.html" target="_blank" rel="noopener">welcome guide</a> on browser startup</div>
+ <div class="settings-item-label">Show the <a href="/welcome.html" target="_blank" rel="noopener">welcome guide</a> on browser startup</div>
</div>
<div class="settings-item-right">
<label class="toggle"><input type="checkbox" data-setting="general.showGuide"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
@@ -726,7 +726,7 @@
Pitch accents for terms and expressions can be shown if a dictionary supporting pitch accents is installed.
There are currently three different ways that pitch accents can be presented:
</p>
- <iframe data-src="/bg/pitch-accents-preview.html" id="pitch-accents-preview-frame" class="defer-load-iframe" data-parent-distance="1"></iframe>
+ <iframe data-src="/pitch-accents-preview.html" id="pitch-accents-preview-frame" class="defer-load-iframe" data-parent-distance="1"></iframe>
<p>
<a class="more-toggle" data-parent-distance="3">Less&hellip;</a>
</p>
@@ -1769,7 +1769,7 @@
<div class="content-right">
<div class="preview-sidebar"><div class="preview-sidebar-inner">
<div class="preview-frame-container">
- <iframe src="/bg/popup-preview.html" class="preview-frame" id="popup-preview-frame"></iframe>
+ <iframe src="/popup-preview.html" class="preview-frame" id="popup-preview-frame"></iframe>
</div>
</div></div>
</div>
diff --git a/ext/bg/template-renderer.html b/ext/template-renderer.html
index 68cba889..68cba889 100644
--- a/ext/bg/template-renderer.html
+++ b/ext/template-renderer.html
diff --git a/ext/bg/welcome.html b/ext/welcome.html
index 53c386fd..d45bc914 100644
--- a/ext/bg/welcome.html
+++ b/ext/welcome.html
@@ -32,15 +32,15 @@
</div></div></div>
<div class="settings-item-children settings-item-children-group">
<div class="settings-item"><div class="settings-item-inner"><div class="settings-item-left"><div class="settings-item-label">
- The <img src="/images/cog.svg" class="inline-icon" alt=""> <em>cog</em> button will open the <a href="settings2.html" target="_blank" rel="noopener">Settings</a> page.
+ The <img src="/images/cog.svg" class="inline-icon" alt=""> <em>cog</em> button will open the <a href="/settings.html" target="_blank" rel="noopener">Settings</a> page.
</div></div></div></div>
<div class="settings-item"><div class="settings-item-inner"><div class="settings-item-left"><div class="settings-item-label">
- The <img src="/images/magnifying-glass.svg" class="inline-icon" alt=""> <em>magnifying glass</em> button will open the <a href="/bg/search.html" target="_blank" rel="noopener">Search</a> page,
+ The <img src="/images/magnifying-glass.svg" class="inline-icon" alt=""> <em>magnifying glass</em> button will open the <a href="/search.html" target="_blank" rel="noopener">Search</a> page,
enabling text and terms to be looked up using the installed dictionaries.
This can even be used in offline mode!
</div></div></div></div>
<div class="settings-item"><div class="settings-item-inner"><div class="settings-item-left"><div class="settings-item-label">
- The <img src="/images/question-mark-circle.svg" class="inline-icon" alt=""> <em>question mark</em> button will open the <a href="/bg/info.html" target="_blank" rel="noopener">Information</a> page,
+ The <img src="/images/question-mark-circle.svg" class="inline-icon" alt=""> <em>question mark</em> button will open the <a href="/info.html" target="_blank" rel="noopener">Information</a> page,
which has some helpful information and links about Yomichan.
</div></div></div></div>
</div>
@@ -51,7 +51,7 @@
Several downloadable dictionaries can be found on the <a href="https://foosoft.net/projects/yomichan/#dictionaries" target="_blank" rel="noopener noreferrer">Yomichan homepage</a>,
allowing you to choose the dictionaries most relevant for you.
Dictionaries can be configured using the button below,
- or later from the the <a href="settings2.html" rel="noopener">Settings</a> page.
+ or later from the the <a href="/settings.html" rel="noopener">Settings</a> page.
</div></div></div>
<div class="settings-item-children settings-item-children-group">
<div class="settings-item settings-item-button" data-modal-action="show,dictionaries"><div class="settings-item-inner">
@@ -82,7 +82,7 @@
</div>
<div class="settings-item">
<div class="settings-item-inner"><div class="settings-item-left"><div class="settings-item-label">
- This startup notification can be turned off using the options below, or later from the <a href="settings2.html" rel="noopener">Settings</a> page.
+ This startup notification can be turned off using the options below, or later from the <a href="/settings.html" rel="noopener">Settings</a> page.
</div></div></div>
</div>
</div>
@@ -165,7 +165,7 @@
</select>
</div>
</div></div>
- <a href="settings2.html" rel="noopener" class="settings-item settings-item-button"><div class="settings-item-inner">
+ <a href="/settings.html" rel="noopener" class="settings-item settings-item-button"><div class="settings-item-inner">
<div class="settings-item-left">
<div class="settings-item-label">More customization options are available on the Settings page</div>
</div>
@@ -234,7 +234,7 @@
<div class="settings-item"><div class="settings-item-inner">
<div class="settings-item-left">
<div class="settings-item-label">
- More dictionary settings are available on the <a href="settings2.html" rel="noopener">Settings</a> page
+ More dictionary settings are available on the <a href="/settings.html" rel="noopener">Settings</a> page
</div>
</div>
</div></div>
diff --git a/test/test-sw.js b/test/test-sw.js
index 8c7b2ab3..5da80dd2 100644
--- a/test/test-sw.js
+++ b/test/test-sw.js
@@ -50,7 +50,7 @@ function main() {
const extDirName = 'ext';
const extDir = path.join(rootDir, extDirName);
- const scripts = getAllHtmlScriptPaths(path.join(extDir, 'bg', 'background.html'));
+ const scripts = getAllHtmlScriptPaths(path.join(extDir, 'background.html'));
convertBackgroundScriptsToServiceWorkerScripts(scripts);
const importedScripts = [];