aboutsummaryrefslogtreecommitdiff
path: root/ext/bg
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg')
-rw-r--r--ext/bg/background.html60
-rw-r--r--ext/bg/context.html97
-rw-r--r--ext/bg/info.html75
-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/bg/legal.html227
-rw-r--r--ext/bg/permissions.html178
-rw-r--r--ext/bg/pitch-accents-preview.html63
-rw-r--r--ext/bg/popup-preview.html62
-rw-r--r--ext/bg/search.html117
-rw-r--r--ext/bg/settings.html1334
-rw-r--r--ext/bg/settings2.html3260
-rw-r--r--ext/bg/template-renderer.html24
-rw-r--r--ext/bg/welcome.html355
16 files changed, 13 insertions, 5865 deletions
diff --git a/ext/bg/background.html b/ext/bg/background.html
deleted file mode 100644
index 101bd09c..00000000
--- a/ext/bg/background.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width,initial-scale=1">
- <title>Background</title>
- <link rel="icon" type="image/png" href="/images/icon16.png" sizes="16x16">
- <link rel="icon" type="image/png" href="/images/icon19.png" sizes="19x19">
- <link rel="icon" type="image/png" href="/images/icon32.png" sizes="32x32">
- <link rel="icon" type="image/png" href="/images/icon38.png" sizes="38x38">
- <link rel="icon" type="image/png" href="/images/icon48.png" sizes="48x48">
- <link rel="icon" type="image/png" href="/images/icon64.png" sizes="64x64">
- <link rel="icon" type="image/png" href="/images/icon128.png" sizes="128x128">
- </head>
- <body>
- <textarea id="clipboard-paste-target"></textarea>
-
- <script src="/mixed/lib/wanakana.min.js"></script>
-
- <script src="/mixed/js/core.js"></script>
- <script src="/mixed/js/yomichan.js"></script>
- <script src="/mixed/js/environment.js"></script>
- <script src="/mixed/js/japanese.js"></script>
-
- <script src="/mixed/js/cache-map.js"></script>
- <script src="/mixed/js/dictionary-data-util.js"></script>
- <script src="/mixed/js/object-property-accessor.js"></script>
-
- <script src="/bg/js/anki.js"></script>
- <script src="/bg/js/audio-downloader.js"></script>
- <script src="/bg/js/clipboard-monitor.js"></script>
- <script src="/bg/js/clipboard-reader.js"></script>
- <script src="/bg/js/database.js"></script>
- <script src="/bg/js/deinflector.js"></script>
- <script src="/bg/js/dictionary-database.js"></script>
- <script src="/bg/js/json-schema.js"></script>
- <script src="/bg/js/mecab.js"></script>
- <script src="/bg/js/media-utility.js"></script>
- <script src="/bg/js/options.js"></script>
- <script src="/bg/js/permissions-util.js"></script>
- <script src="/bg/js/profile-conditions.js"></script>
- <script src="/bg/js/request-builder.js"></script>
- <script src="/bg/js/native-simple-dom-parser.js"></script>
- <script src="/bg/js/template-patcher.js"></script>
- <script src="/bg/js/text-source-map.js"></script>
- <script src="/bg/js/translator.js"></script>
-
- <script src="/bg/js/backend.js"></script>
-
- <script src="/bg/js/background-main.js"></script>
-
- <!--
- Due to a Firefox bug, this next element is purposefully terminated incorrectly.
- This element must appear directly inside the <body> element, and it must not be closed properly.
- https://bugzilla.mozilla.org/show_bug.cgi?id=1603985
- -->
- <!-- [html-validate-disable close-order] -->
- <div id="clipboard-image-paste-target" contenteditable="true">
- </body>
-</html>
diff --git a/ext/bg/context.html b/ext/bg/context.html
deleted file mode 100644
index 1b0072a6..00000000
--- a/ext/bg/context.html
+++ /dev/null
@@ -1,97 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width,initial-scale=1">
- <title>Yomichan Action Popup</title>
- <link rel="icon" type="image/png" href="/images/icon16.png" sizes="16x16">
- <link rel="icon" type="image/png" href="/images/icon19.png" sizes="19x19">
- <link rel="icon" type="image/png" href="/images/icon32.png" sizes="32x32">
- <link rel="icon" type="image/png" href="/images/icon38.png" sizes="38x38">
- <link rel="icon" type="image/png" href="/images/icon48.png" sizes="48x48">
- <link rel="icon" type="image/png" href="/images/icon64.png" sizes="64x64">
- <link rel="icon" type="image/png" href="/images/icon128.png" sizes="128x128">
- <link rel="stylesheet" type="text/css" href="/css/context.css">
-</head>
-<body>
-
-<div id="mini">
- <label class="toggle">
- <input type="checkbox" id="enable-search">
- <div class="toggle-group">
- <span class="toggle-on">On</span>
- <span class="toggle-off">Off</span>
- <span class="toggle-handle"></span>
- </div>
- </label>
- <div class="nav-button-container">
- <button class="nav-button action-select-profile" title="Change primary profile" hidden>
- <span class="icon" data-icon="profile"></span>
- <span class="profile-select-container"><select class="profile-select" id="profile-select">
- <optgroup label="Primary Profile" id="profile-select-option-group"></optgroup>
- </select></span>
- </button>
- <a class="nav-button action-open-settings" title="Settings" data-hotkey='["global:openSettingsPage","title","Settings ({0})"]'>
- <span class="icon" data-icon="cog"></span>
- <div class="nav-button-warning-badge no-dictionaries-enabled-warning" hidden>
- <div class="nav-button-warning-badge-outer"></div>
- <div class="nav-button-warning-badge-inner"></div>
- </div>
- </a>
- <a class="nav-button action-open-permissions" title="Permissions" hidden>
- <span class="icon" data-icon="key"></span>
- <div class="nav-button-warning-badge permissions-required-warning" hidden>
- <div class="nav-button-warning-badge-outer"></div>
- <div class="nav-button-warning-badge-inner"></div>
- </div>
- </a>
- <a class="nav-button action-open-search" title="Search" data-hotkey='["global:openSearchPage","title","Search ({0})"]'>
- <span class="icon" data-icon="magnifying-glass"></span>
- </a>
- <a class="nav-button action-open-info" title="Information" data-hotkey='["global:openInfoPage","title","Information ({0})"]'>
- <span class="icon" data-icon="question-mark-circle"></span>
- </a>
- </div>
-</div>
-
-<div id="full">
- <h3 id="extension-info">Yomichan</h3>
- <label class="link-group">
- <span class="link-group-icon"><input type="checkbox" id="enable-search2"></span><span class="link-group-label">Enable content scanning</span>
- </label>
- <a class="link-group action-open-settings">
- <span class="link-group-icon" data-icon="chevron"></span>
- <span class="link-group-label">Settings</span>
- <span class="link-group-badge">
- <div class="flex-margin-left warning-badge no-dictionaries-enabled-warning" hidden><span class="icon" data-icon="exclamation-point-short"></span></div>
- </span>
- </a>
- <a class="link-group action-open-permissions" hidden>
- <span class="link-group-icon" data-icon="chevron"></span>
- <span class="link-group-label">Permissions</span>
- <span class="link-group-badge">
- <div class="flex-margin-left warning-badge permissions-required-warning" hidden><span class="icon" data-icon="exclamation-point-short"></span></div>
- </span>
- </a>
- <a class="link-group action-open-search">
- <span class="link-group-icon" data-icon="chevron"></span><span class="link-group-label">Search</span>
- </a>
- <a class="link-group action-open-info">
- <span class="link-group-icon" data-icon="chevron"></span><span class="link-group-label">Help</span>
- </a>
-</div>
-
-<script src="/mixed/js/core.js"></script>
-<script src="/mixed/js/yomichan.js"></script>
-<script src="/mixed/js/comm.js"></script>
-<script src="/mixed/js/api.js"></script>
-
-<script src="/mixed/js/hotkey-help-controller.js"></script>
-<script src="/mixed/js/hotkey-util.js"></script>
-
-<script src="/bg/js/permissions-util.js"></script>
-
-<script src="/bg/js/context-main.js"></script>
-
-</body>
-</html>
diff --git a/ext/bg/info.html b/ext/bg/info.html
deleted file mode 100644
index 920f94a0..00000000
--- a/ext/bg/info.html
+++ /dev/null
@@ -1,75 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width,initial-scale=1">
- <title>Yomichan Info</title>
- <link rel="icon" type="image/png" href="/images/icon16.png" sizes="16x16">
- <link rel="icon" type="image/png" href="/images/icon19.png" sizes="19x19">
- <link rel="icon" type="image/png" href="/images/icon32.png" sizes="32x32">
- <link rel="icon" type="image/png" href="/images/icon38.png" sizes="38x38">
- <link rel="icon" type="image/png" href="/images/icon48.png" sizes="48x48">
- <link rel="icon" type="image/png" href="/images/icon64.png" sizes="64x64">
- <link rel="icon" type="image/png" href="/images/icon128.png" sizes="128x128">
- <link rel="stylesheet" type="text/css" href="/css/material.css">
- <link rel="stylesheet" type="text/css" href="/css/settings2.css">
-</head>
-<body>
-
-<!-- Main content -->
-<div class="content-outer"><div class="content">
-<div class="content-center">
-
- <span tabindex="-1" id="content-scroll-focus"></span>
-
- <h1>Yomichan Info</h1>
-
- <h2 id="general">General</h2>
- <div class="settings-group">
- <div class="settings-item"><div class="settings-item-inner"><div class="settings-item-left"><div class="settings-item-label">
- <ul>
- <li>Extension version: <span id="version"></span></li>
- <li>Platform: <span id="platform"></span></li>
- <li>Browser: <span id="browser"></span></li>
- <li>Language: <span id="language"></span></li>
- <li>User agent: <span id="user-agent"></span></li>
- <li>AnkiConnect version: <span id="anki-connect-version-container"><span id="anki-connect-version">...</span><em class="light" id="anki-connect-version-unknown-message" hidden> (Anki not running or connected)</em></span></li>
- <li>Installed dictionaries: <span id="installed-dictionaries">...</span><em id="installed-dictionaries-none" hidden>None installed</em></li>
- <li><a id="settings-export-button">Export settings</a></li>
- </ul>
- </div></div></div></div>
- </div>
-
- <h2 id="links">Links</h2>
- <div class="settings-group">
- <div class="settings-item"><div class="settings-item-inner"><div class="settings-item-left"><div class="settings-item-label">
- <ul>
- <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>
- </ul>
- </div></div></div></div>
- </div>
-
- <div class="footer-padding"></div>
-
-</div>
-</div></div>
-
-<!-- Scripts -->
-<script src="/mixed/js/core.js"></script>
-<script src="/mixed/js/yomichan.js"></script>
-<script src="/mixed/js/comm.js"></script>
-<script src="/mixed/js/api.js"></script>
-
-<script src="/mixed/js/document-focus-controller.js"></script>
-<script src="/mixed/js/html-template-collection.js"></script>
-<script src="/bg/js/permissions-util.js"></script>
-<script src="/bg/js/settings/settings-controller.js"></script>
-<script src="/bg/js/settings/backup-controller.js"></script>
-
-<script src="/bg/js/info-main.js"></script>
-
-</body>
-</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/legal.html b/ext/bg/legal.html
deleted file mode 100644
index b8c1f1c5..00000000
--- a/ext/bg/legal.html
+++ /dev/null
@@ -1,227 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width,initial-scale=1">
- <title>Yomichan Legal</title>
- <link rel="icon" type="image/png" href="/images/icon16.png" sizes="16x16">
- <link rel="icon" type="image/png" href="/images/icon19.png" sizes="19x19">
- <link rel="icon" type="image/png" href="/images/icon32.png" sizes="32x32">
- <link rel="icon" type="image/png" href="/images/icon38.png" sizes="38x38">
- <link rel="icon" type="image/png" href="/images/icon48.png" sizes="48x48">
- <link rel="icon" type="image/png" href="/images/icon64.png" sizes="64x64">
- <link rel="icon" type="image/png" href="/images/icon128.png" sizes="128x128">
- <link rel="stylesheet" type="text/css" href="/css/material.css">
- <link rel="stylesheet" type="text/css" href="/css/settings2.css">
-</head>
-<body>
-
-<!-- Main content -->
-<div class="content-outer"><div class="content">
-<div class="content-center">
-
- <span tabindex="-1" id="content-scroll-focus"></span>
-
- <h1>Yomichan Legal</h1>
-
- <h2>Yomichan License</h2>
- <div class="settings-group"><div class="settings-item"><div class="settings-item-inner"><div class="settings-item-left"><div class="settings-item-label">
-<pre>
-Copyright (C) 2016-2021 Yomichan Authors
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see &lt;https://www.gnu.org/licenses/&gt;.
-</pre>
- </div></div></div></div></div>
-
- <h2>EDRDG License</h2>
- <div class="settings-group"><div class="settings-item"><div class="settings-item-inner"><div class="settings-item-left"><div class="settings-item-label">
-<pre>
-This package uses the <a href="https://www.edrdg.org/jmdict/edict.html" target="_blank" rel="noopener">EDICT</a> and <a href="https://www.edrdg.org/wiki/index.php/KANJIDIC_Project" target="_blank" rel="noopener">KANJIDIC</a> dictionary files. These files are
-the property of the <a href="https://www.edrdg.org/" target="_blank" rel="noopener">Electronic Dictionary Research and Development Group</a>,
-and are used in conformance with the Group's <a href="https://www.edrdg.org/edrdg/licence.html" target="_blank" rel="noopener">licence</a>.
-</pre>
- </div></div></div></div></div>
-
- <h2><a href="https://github.com/twbs/bootstrap/blob/v3.3.7/LICENSE" target="_blank" rel="noopener noreferrer">Bootstrap v3.3.7</a></h2>
- <div class="settings-group"><div class="settings-item"><div class="settings-item-inner"><div class="settings-item-left"><div class="settings-item-label">
-<pre>
-The MIT License (MIT)
-
-Copyright (c) 2011-2016 Twitter, Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-</pre>
- </div></div></div></div></div>
-
- <h2><a href="https://github.com/wycats/handlebars.js/blob/v4.0.6/LICENSE" target="_blank" rel="noopener noreferrer">Handlebars v4.0.6</a></h2>
- <div class="settings-group"><div class="settings-item"><div class="settings-item-inner"><div class="settings-item-left"><div class="settings-item-label">
-<pre>
-Copyright (C) 2011-2016 by Yehuda Katz
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-</pre>
- </div></div></div></div></div>
-
- <h2><a href="https://github.com/jquery/jquery/blob/3.2.1/LICENSE.txt" target="_blank" rel="noopener noreferrer">jQuery v3.2.1</a></h2>
- <div class="settings-group"><div class="settings-item"><div class="settings-item-inner"><div class="settings-item-left"><div class="settings-item-label">
-<pre>
-Copyright JS Foundation and other contributors, https://js.foundation/
-
-This software consists of voluntary contributions made by many
-individuals. For exact contribution history, see the revision history
-available at https://github.com/jquery/jquery
-
-The following license applies to all parts of this software except as
-documented below:
-
-====
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-====
-
-All files located in the node_modules and external directories are
-externally maintained libraries used by this software which have their
-own licenses; we recommend you read them, as their terms may differ from
-the terms above.
-</pre>
- </div></div></div></div></div>
-
- <h2><a href="https://github.com/Stuk/jszip/blob/v3.1.3/LICENSE.markdown" target="_blank" rel="noopener noreferrer">JSZip v3.1.3</a></h2>
- <div class="settings-group"><div class="settings-item"><div class="settings-item-inner"><div class="settings-item-left"><div class="settings-item-label">
-<pre>
-Copyright (c) 2009-2016 Stuart Knightley, David Duponchel, Franz Buchinger, António Afonso
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-</pre>
- </div></div></div></div></div>
-
- <h2><a href="https://github.com/WaniKani/WanaKana/blob/4.0.2/LICENSE" target="_blank" rel="noopener noreferrer">WanaKana v4.0.2</a></h2>
- <div class="settings-group"><div class="settings-item"><div class="settings-item-inner"><div class="settings-item-left"><div class="settings-item-label">
-<pre>
-The MIT License (MIT)
-
-Copyright (c) 2013 WaniKani Community Github
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-</pre>
- </div></div></div></div></div>
-
- <div data-show-for-manifest-version="3">
- <h2><a href="https://github.com/inikulin/parse5/blob/v6.0.1/LICENSE" target="_blank" rel="noopener noreferrer">parse5 v6.0.1</a></h2>
- <div class="settings-group"><div class="settings-item"><div class="settings-item-inner"><div class="settings-item-left"><div class="settings-item-label">
-<pre>
-Copyright (c) 2013-2019 Ivan Nikulin (ifaaan@gmail.com, https://github.com/inikulin)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-</pre>
- </div></div></div></div></div>
- </div>
-
- <div class="footer-padding"></div>
-
-</div>
-</div></div>
-
-<!-- Scripts -->
-<script src="/mixed/js/document-focus-controller.js"></script>
-
-<script src="/bg/js/generic-page-main.js"></script>
-
-</body>
-</html>
diff --git a/ext/bg/permissions.html b/ext/bg/permissions.html
deleted file mode 100644
index 2ea9f2a1..00000000
--- a/ext/bg/permissions.html
+++ /dev/null
@@ -1,178 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width,initial-scale=1">
- <title>Yomichan Permissions</title>
- <link rel="icon" type="image/png" href="/images/icon16.png" sizes="16x16">
- <link rel="icon" type="image/png" href="/images/icon19.png" sizes="19x19">
- <link rel="icon" type="image/png" href="/images/icon32.png" sizes="32x32">
- <link rel="icon" type="image/png" href="/images/icon38.png" sizes="38x38">
- <link rel="icon" type="image/png" href="/images/icon48.png" sizes="48x48">
- <link rel="icon" type="image/png" href="/images/icon64.png" sizes="64x64">
- <link rel="icon" type="image/png" href="/images/icon128.png" sizes="128x128">
- <link rel="stylesheet" type="text/css" href="/css/material.css">
- <link rel="stylesheet" type="text/css" href="/css/settings2.css">
-</head>
-<body>
-
-<!-- Main content -->
-<div class="content-outer"><div class="content">
-<div class="content-center">
-
- <span tabindex="-1" id="content-scroll-focus"></span>
-
- <h1>Yomichan Permissions</h1>
-
- <h2 id="permissions"></h2>
- <div class="settings-group">
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label"><code>&lt;all_urls&gt;</code></div>
- <div class="settings-item-description">
- Yomichan requires access to all URLs in order to run scripts to scan text and show the definitions popup,
- request audio for playback and download, and connect with Anki.
- </div>
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label"><code>storage</code> and <code>unlimitedStorage</code></div>
- <div class="settings-item-description">
- Yomichan uses storage permissions in order to save extension settings and dictionary data.
- <code>unlimitedStorage</code> is used to help prevent web browsers from unexpectedly
- deleting dictionary data.
- </div>
- </div>
- </div></div>
- <div class="settings-item" data-hide-for-manifest-version="3"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label"><code>webRequest</code> and <code>webRequestBlocking</code></div>
- <div class="settings-item-description">
- <p>
- Yomichan uses these permissions to ensure certain requests have valid and secure headers.
- This sometimes involves removing or changing the <code>Origin</code> request header,
- as this can be used to fingerprint browser configuration.
- </p>
- <p>
- Example: <code>Origin: <span class="extension-id-example"></span></code>
- </p>
- </div>
- </div>
- </div></div>
- <div class="settings-item" data-show-for-manifest-version="3"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label"><code>declarativeNetRequest</code></div>
- <div class="settings-item-description">
- <p>
- Yomichan uses this permission to ensure certain requests have valid and secure headers.
- This sometimes involves removing or changing the <code>Origin</code> request header,
- as this can be used to fingerprint browser configuration.
- </p>
- <p>
- Example: <code>Origin: <span class="extension-id-example"></span></code>
- </p>
- </div>
- </div>
- </div></div>
- <div class="settings-item" data-show-for-manifest-version="3"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label"><code>scripting</code></div>
- <div class="settings-item-description">
- Yomichan will sometimes need to inject stylesheets into webpages in order to
- properly display the search popup.
- </div>
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label"><code>clipboardWrite</code></div>
- <div class="settings-item-description">
- Yomichan supports simulating the <code>Ctrl+C</code> (copy to clipboard) keyboard shortcut
- when a definitions popup is open and focused.
- </div>
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label"><code>clipboardRead</code> <span class="light">(optional)</span></div>
- <div class="settings-item-description">
- Yomichan supports automatically opening a search window when Japanese text is copied to the clipboard
- while the browser is running, depending on how certain settings are configured.
- This allows Yomichan to support scanning text from external applications, provided there is a way
- to copy text from those applications to the clipboard.
- </div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" class="permissions-toggle" data-required-permissions="clipboardRead"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label"><code>nativeMessaging</code> <span class="light" data-show-for-browser="chrome edge">(optional)</span></div>
- <div class="settings-item-description">
- Yomichan has the ability to communicate with an optional native messaging component in order to support
- parsing large blocks of Japanese text using
- <a href="https://en.wikipedia.org/wiki/MeCab" target="_blank" rel="noopener noreferrer">MeCab</a>.
- The installation of this component is optional and is not included by default.
- </div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" class="permissions-toggle" data-required-permissions="nativeMessaging"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Allow in private windows <span class="light">(optional)</span></div>
- <div class="settings-item-description">
- <p>
- When enabled, Yomichan is able to scan text and show definitions in private/incognito web browser windows.
- </p>
- <p>
- This option can be configured from the web browser's extension settings pages.
- </p>
- </div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" id="permission-checkbox-allow-in-private-windows" disabled><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Allow access to file URLs <span class="light">(optional)</span></div>
- <div class="settings-item-description">
- <p>
- When enabled, Yomichan is able to scan text and show definitions on local HTML files located using the <code>file://*</code> scheme.
- </p>
- <p data-show-for-browser="chrome edge">
- This option can be configured from the web browser's extension settings pages.
- </p>
- </div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" id="permission-checkbox-allow-file-url-access" disabled><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- </div>
-
- <div class="footer-padding"></div>
-
-</div>
-</div></div>
-
-<!-- Scripts -->
-<script src="/mixed/js/core.js"></script>
-<script src="/mixed/js/yomichan.js"></script>
-<script src="/mixed/js/comm.js"></script>
-<script src="/mixed/js/api.js"></script>
-
-<script src="/mixed/js/document-focus-controller.js"></script>
-<script src="/mixed/js/html-template-collection.js"></script>
-<script src="/bg/js/permissions-util.js"></script>
-<script src="/bg/js/settings/permissions-toggle-controller.js"></script>
-<script src="/bg/js/settings/settings-controller.js"></script>
-
-<script src="/bg/js/permissions-main.js"></script>
-
-</body>
-</html>
diff --git a/ext/bg/pitch-accents-preview.html b/ext/bg/pitch-accents-preview.html
deleted file mode 100644
index b2885c92..00000000
--- a/ext/bg/pitch-accents-preview.html
+++ /dev/null
@@ -1,63 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width,initial-scale=1">
- <title>Yomichan Pitch Accents Preview</title>
- <link rel="icon" type="image/png" href="/images/icon16.png" sizes="16x16">
- <link rel="icon" type="image/png" href="/images/icon19.png" sizes="19x19">
- <link rel="icon" type="image/png" href="/images/icon32.png" sizes="32x32">
- <link rel="icon" type="image/png" href="/images/icon38.png" sizes="38x38">
- <link rel="icon" type="image/png" href="/images/icon48.png" sizes="48x48">
- <link rel="icon" type="image/png" href="/images/icon64.png" sizes="64x64">
- <link rel="icon" type="image/png" href="/images/icon128.png" sizes="128x128">
- <link rel="stylesheet" type="text/css" href="/css/display.css">
- <link rel="stylesheet" type="text/css" href="/css/pitch-accents-preview.css">
-</head>
-<body>
-
-<div class="content"><div class="content-body">
-
-<ul>
- <li>
- <strong>Downstep notation</strong> -
- <span class="format-preview" lang="ja">
- <span class="term-pitch-accent-characters"><span class="term-pitch-accent-character" data-position="0" data-pitch="high" data-pitch-next="low"><span class="term-pitch-accent-character-inner">よ</span></span><span class="term-pitch-accent-character" data-position="1" data-pitch="low" data-pitch-next="low"><span class="term-pitch-accent-character-inner">む</span></span></span>
- </span>
- </li>
- <li>
- <strong>Downstep position</strong> -
- <span class="format-preview">
- <span class="term-pitch-accent-position">1</span>
- </span>
- </li>
- <li>
- <strong>Graph</strong> -
- <span class="format-preview">
- <span class="term-pitch-accent-details">
- <svg class="term-pitch-accent-graph" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 100" focusable="false">
- <path class="term-pitch-accent-graph-line" d="M25 25 L75 75"></path>
- <path class="term-pitch-accent-graph-line-tail" d="M75 75 L125 75"></path>
- <use href="#term-pitch-accent-graph-dot-downstep" x="25" y="25"></use>
- <use href="#term-pitch-accent-graph-dot" x="75" y="75"></use>
- <use href="#term-pitch-accent-graph-triangle" x="125" y="75"></use>
- </svg>
- </span>
- </span>
- </li>
-</ul>
-
-</div></div>
-
-<script src="/mixed/js/core.js"></script>
-<script src="/mixed/js/yomichan.js"></script>
-<script src="/mixed/js/comm.js"></script>
-<script src="/mixed/js/api.js"></script>
-
-<script src="/mixed/js/display-generator.js"></script>
-<script src="/mixed/js/html-template-collection.js"></script>
-
-<script src="/bg/js/settings/pitch-accents-preview-main.js"></script>
-
-</body>
-</html>
diff --git a/ext/bg/popup-preview.html b/ext/bg/popup-preview.html
deleted file mode 100644
index 5a8da859..00000000
--- a/ext/bg/popup-preview.html
+++ /dev/null
@@ -1,62 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width,initial-scale=1">
- <title>Yomichan Popup Preview</title>
- <link rel="icon" type="image/png" href="/images/icon16.png" sizes="16x16">
- <link rel="icon" type="image/png" href="/images/icon19.png" sizes="19x19">
- <link rel="icon" type="image/png" href="/images/icon32.png" sizes="32x32">
- <link rel="icon" type="image/png" href="/images/icon38.png" sizes="38x38">
- <link rel="icon" type="image/png" href="/images/icon48.png" sizes="48x48">
- <link rel="icon" type="image/png" href="/images/icon64.png" sizes="64x64">
- <link rel="icon" type="image/png" href="/images/icon128.png" sizes="128x128">
- <link rel="stylesheet" type="text/css" href="/css/popup-preview.css">
- <link rel="stylesheet" type="text/css" href="/css/popup-outer.css" id="popup-outer-css">
-</head>
-<body>
-
-<div class="content"><div class="content-body">
- <div class="top-options">
- <div class="top-options-left">
- <div class="example-text-container">
- <input type="text" class="example-text example-text-input" id="example-text-input" value="読め" lang="ja" hidden>
- <span class="example-text" id="example-text">読め</span>
- </div>
- </div>
- <div class="top-options-right">
- <label class="theme-button"><input type="checkbox" id="theme-dark-checkbox"><span>dark</span></label>
- </div>
- </div>
- <div class="popup-placeholder"><div class="placeholder-info">
- This page uses the dictionaries you have installed in order to show a preview.
- If you see this message, make sure you have a dictionary installed.
- </div></div>
-</div></div>
-
-<script src="/mixed/lib/wanakana.min.js"></script>
-
-<script src="/mixed/js/core.js"></script>
-<script src="/mixed/js/yomichan.js"></script>
-<script src="/mixed/js/comm.js"></script>
-<script src="/mixed/js/api.js"></script>
-<script src="/mixed/js/dynamic-loader.js"></script>
-<script src="/mixed/js/frame-client.js"></script>
-<script src="/mixed/js/text-scanner.js"></script>
-
-<script src="/mixed/js/document-util.js"></script>
-<script src="/mixed/js/hotkey-handler.js"></script>
-<script src="/fg/js/dom-text-scanner.js"></script>
-<script src="/fg/js/popup.js"></script>
-<script src="/fg/js/text-source-range.js"></script>
-<script src="/fg/js/text-source-element.js"></script>
-<script src="/fg/js/popup-factory.js"></script>
-<script src="/fg/js/frontend.js"></script>
-<script src="/fg/js/frame-ancestry-handler.js"></script>
-<script src="/fg/js/frame-offset-forwarder.js"></script>
-<script src="/bg/js/settings/popup-preview-frame.js"></script>
-
-<script src="/bg/js/settings/popup-preview-frame-main.js"></script>
-
-</body>
-</html>
diff --git a/ext/bg/search.html b/ext/bg/search.html
deleted file mode 100644
index a949beff..00000000
--- a/ext/bg/search.html
+++ /dev/null
@@ -1,117 +0,0 @@
-<!DOCTYPE html>
-<html lang="en" data-page-type="search">
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width,initial-scale=1">
- <title>Yomichan Search</title>
- <link rel="icon" type="image/png" href="/images/icon16.png" sizes="16x16">
- <link rel="icon" type="image/png" href="/images/icon19.png" sizes="19x19">
- <link rel="icon" type="image/png" href="/images/icon32.png" sizes="32x32">
- <link rel="icon" type="image/png" href="/images/icon38.png" sizes="38x38">
- <link rel="icon" type="image/png" href="/images/icon48.png" sizes="48x48">
- <link rel="icon" type="image/png" href="/images/icon64.png" sizes="64x64">
- <link rel="icon" type="image/png" href="/images/icon128.png" sizes="128x128">
- <link rel="stylesheet" type="text/css" href="/css/material.css">
- <link rel="stylesheet" type="text/css" href="/css/display.css">
- <link rel="stylesheet" type="text/css" href="/css/search.css">
-</head>
-<body>
-
-<div class="content-outer">
- <div class="content">
- <div class="content-scroll scrollbar" id="content-scroll">
- <div class="content-body" id="content-body">
- <div class="top-progress-bar-container"><div class="progress-bar-indeterminant" id="progress-indicator" hidden></div></div>
- <div class="content-body-inner">
-
- <span tabindex="-1" id="content-scroll-focus"></span>
-
- <div id="intro">
- <h1>Yomichan Search</h1>
- </div>
-
- <div class="scan-disable">
- <div class="search-options">
- <label class="search-option">
- <label class="toggle"><input type="checkbox" id="wanakana-enable"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- <span class="search-option-label">Automatic kana conversion</span>
- </label>
- <label class="search-option">
- <label class="toggle"><input type="checkbox" id="clipboard-monitor-enable"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- <span class="search-option-label">Clipboard monitor</span>
- </label>
- <div class="search-option" id="query-parser-mode-container" hidden>
- <span class="search-option-pre-label">Parser:</span>
- <select id="query-parser-mode-select"></select>
- </div>
- </div>
- <div class="search-textbox-container">
- <textarea id="search-textbox" placeholder="Input a term, expression, sentence, or block of text" autocomplete="off" lang="ja" autofocus></textarea>
- <button id="search-button"><span class="icon" data-icon="magnifying-glass"></span></button>
- </div>
- </div>
-
- <div class="scan-disable" id="query-parser-container" hidden>
- <div id="query-parser-content"></div>
- </div>
-
- <div id="definitions"></div>
-
- <div id="no-results" hidden>
- <div class="entry">
- <p>No results found.</p>
- </div>
- </div>
-
- </div>
- </div>
- </div>
- <div class="content-footer-container1"><div class="content-footer-container2"><div class="content-footer" id="content-footer"></div><div class="scrollbar-spacer scrollbar"></div></div></div>
- </div>
-</div>
-
-<div id="popup-menus"></div>
-
-<!-- Scripts -->
-<script src="/mixed/lib/wanakana.min.js"></script>
-
-<script src="/mixed/js/core.js"></script>
-<script src="/mixed/js/yomichan.js"></script>
-<script src="/mixed/js/comm.js"></script>
-<script src="/mixed/js/api.js"></script>
-<script src="/mixed/js/japanese.js"></script>
-
-<script src="/mixed/js/document-focus-controller.js"></script>
-<script src="/mixed/js/document-util.js"></script>
-<script src="/fg/js/dom-text-scanner.js"></script>
-<script src="/fg/js/text-source-range.js"></script>
-<script src="/fg/js/text-source-element.js"></script>
-<script src="/mixed/js/audio-system.js"></script>
-<script src="/mixed/js/dictionary-data-util.js"></script>
-<script src="/mixed/js/display.js"></script>
-<script src="/mixed/js/display-audio.js"></script>
-<script src="/mixed/js/display-generator.js"></script>
-<script src="/mixed/js/display-history.js"></script>
-<script src="/mixed/js/display-notification.js"></script>
-<script src="/mixed/js/dynamic-loader.js"></script>
-<script src="/mixed/js/hotkey-handler.js"></script>
-<script src="/mixed/js/hotkey-help-controller.js"></script>
-<script src="/mixed/js/hotkey-util.js"></script>
-<script src="/mixed/js/media-loader.js"></script>
-<script src="/mixed/js/popup-menu.js"></script>
-<script src="/mixed/js/scroll.js"></script>
-<script src="/mixed/js/text-scanner.js"></script>
-<script src="/mixed/js/html-template-collection.js"></script>
-<script src="/mixed/js/text-to-speech-audio.js"></script>
-
-<script src="/bg/js/anki-note-builder.js"></script>
-<script src="/bg/js/template-renderer-proxy.js"></script>
-
-<script src="/bg/js/query-parser.js"></script>
-<script src="/bg/js/clipboard-monitor.js"></script>
-<script src="/bg/js/search-display-controller.js"></script>
-
-<script src="/bg/js/search-main.js"></script>
-
-</body>
-</html>
diff --git a/ext/bg/settings.html b/ext/bg/settings.html
deleted file mode 100644
index 3e3f1961..00000000
--- a/ext/bg/settings.html
+++ /dev/null
@@ -1,1334 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width,initial-scale=1">
- <title>Yomichan Options (Old)</title>
- <link rel="icon" type="image/png" href="/images/icon16.png" sizes="16x16">
- <link rel="icon" type="image/png" href="/images/icon19.png" sizes="19x19">
- <link rel="icon" type="image/png" href="/images/icon32.png" sizes="32x32">
- <link rel="icon" type="image/png" href="/images/icon38.png" sizes="38x38">
- <link rel="icon" type="image/png" href="/images/icon48.png" sizes="48x48">
- <link rel="icon" type="image/png" href="/images/icon64.png" sizes="64x64">
- <link rel="icon" type="image/png" href="/images/icon128.png" sizes="128x128">
- <link rel="stylesheet" type="text/css" href="/mixed/lib/bootstrap/css/bootstrap.min.css">
- <link rel="stylesheet" type="text/css" href="/mixed/lib/bootstrap/css/bootstrap-theme.min.css">
- <link rel="stylesheet" type="text/css" href="/css/settings.css">
- </head>
- <body>
- <div class="container">
- <div class="page-header">
- <h1>Yomichan Options</h1>
- </div>
-
- <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>
- 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>
-
- <div class="profile-form ignore-form-changes">
- <h3>Profiles</h3>
-
- <p class="help-block">
- Profiles allow you to create multiple configurations and quickly switch between them or use them in different contexts.
- </p>
-
- <div class="form-group">
- <label for="profile-active-select">Active profile</label>
- <select class="form-control" id="profile-active-select"></select>
- </div>
-
- <div class="form-group">
- <label for="profile-target-select">Modifying profile</label>
- <div class="input-group">
- <div class="input-group-btn">
- <button class="btn btn-default" id="profile-add-button" title="Add"><span class="glyphicon glyphicon-plus"></span></button>
- <button class="btn btn-default" id="profile-move-up-button" title="Move up"><span class="glyphicon glyphicon-arrow-up"></span></button>
- <button class="btn btn-default" id="profile-move-down-button" title="Move down"><span class="glyphicon glyphicon-arrow-down"></span></button>
- <button class="btn btn-default" id="profile-copy-button" title="Copy"><span class="glyphicon glyphicon-copy"></span></button>
- </div>
- <select class="form-control profile-form-manual" id="profile-target-select"></select>
- <div class="input-group-btn">
- <button class="btn btn-danger" id="profile-remove-button" title="Remove"><span class="glyphicon glyphicon-remove"></span></button>
- </div>
- </div>
- </div>
-
- <div class="form-group">
- <label for="profile-name-input">Profile name</label>
- <input type="text" id="profile-name-input" class="form-control">
- </div>
-
- <div class="form-group">
- <label>Usage conditions</label>
-
- <p class="help-block">
- Usage conditions can be assigned such that certain profiles are automatically used in different contexts.
- For example, when <a href="#popup-content-scanning">Popup Content Scanning</a> is enabled, different profiles can be used
- depending on the level of the popup.
- </p>
-
- <p class="help-block">
- Conditions are organized into groups which represent how the conditions are checked.
- If all of the conditions in any group are met, then the profile will automatically be used for that context.
- If no conditions are specified, the profile will only be used if it is selected as the <strong>Active profile</strong>.
- </p>
-
- <div class="profile-condition-groups" id="profile-condition-groups"></div>
- </div>
- <div class="form-group">
- <button class="btn btn-default" id="profile-add-condition-group">Add Condition Group</button>
- </div>
-
- <div class="modal fade" tabindex="-1" role="dialog" id="profile-copy">
- <div class="modal-dialog modal-dialog-centered">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
- <h4 class="modal-title">Copy Profile</h4>
- </div>
- <div class="modal-body">
- <p>Select which profile to copy options from:</p>
- <select class="form-control" id="profile-copy-source-select"></select>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
- <button type="button" class="btn btn-primary" id="profile-copy-confirm-button">Copy Profile</button>
- </div>
- </div>
- </div>
- </div>
-
- <div class="modal fade" tabindex="-1" role="dialog" id="profile-remove">
- <div class="modal-dialog modal-dialog-centered">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
- <h4 class="modal-title">Confirm profile removal</h4>
- </div>
- <div class="modal-body">
- Are you sure you want to delete the profile <em id="profile-remove-name"></em>?
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
- <button type="button" class="btn btn-danger" id="profile-remove-confirm-button">Remove Profile</button>
- </div>
- </div>
- </div>
- </div>
-
- <template id="profile-condition-group-template"><div class="profile-condition-group">
- <div class="profile-condition-list"></div>
- <div class="profile-condition-group-options">
- <button class="btn btn-default profile-condition-add-button"><span class="glyphicon glyphicon-plus"></span></button>
- </div>
- <div class="profile-condition-group-separator-label">OR</div>
- </div></template>
- <template id="profile-condition-template"><div class="input-group condition">
- <div class="input-group-addon profile-condition-prefix"></div>
- <div class="input-group-btn"><select class="form-control btn btn-default profile-condition-type"><optgroup label="Type"></optgroup></select></div>
- <div class="input-group-btn"><select class="form-control btn btn-default profile-condition-operator"><optgroup label="Operator"></optgroup></select></div>
- <div class="profile-condition-line-break"></div>
- <div class="profile-condition-input-container"><input type="text" class="form-control profile-condition-input"></div>
- <div class="input-group-btn"><button class="btn btn-default mouse-button mouse-button-container" title="Mouse button"><span class="mouse-button-icon"></span></button><button class="btn btn-danger profile-condition-remove" title="Remove"><span class="glyphicon glyphicon-remove"></span></button></div>
- </div></template>
- </div>
-
- <div>
- <h3>General Options</h3>
-
- <div class="checkbox">
- <label><input type="checkbox" id="enable" data-setting="general.enable"> Enable content scanning</label>
- </div>
-
- <div class="checkbox">
- <label><input type="checkbox" id="show-usage-guide" data-setting="general.showGuide"> Show usage guide on startup</label>
- </div>
-
- <div class="checkbox">
- <label><input type="checkbox" id="compact-tags" data-setting="general.compactTags"> Compact tags</label>
- </div>
-
- <div class="checkbox">
- <label><input type="checkbox" id="show-advanced-options" data-setting="general.showAdvanced"
- data-transform='{
- "type": "setAttribute",
- "selector": ":root",
- "attribute": "data-options-general-show-advanced"
- }'
- > Show advanced options</label>
- </div>
-
- <div class="checkbox options-advanced ignore-form-changes" data-hide-for-browser="firefox-mobile">
- <label><input type="checkbox" class="permissions-toggle" data-permissions-setting="clipboard.enableBackgroundMonitor" data-required-permissions="clipboardRead"> Enable native popups when copying Japanese text</label>
- </div>
-
- <div class="checkbox options-advanced">
- <label><input type="checkbox" id="popup-scale-relative-to-page-zoom" data-setting="general.popupScaleRelativeToPageZoom"> Change popup size relative to page zoom level</label>
- </div>
-
- <div class="checkbox options-advanced">
- <label><input type="checkbox" id="popup-scale-relative-to-visual-viewport" data-setting="general.popupScaleRelativeToVisualViewport"> Change popup size relative to page viewport</label>
- </div>
-
- <div class="checkbox options-advanced">
- <label><input type="checkbox" id="show-pitch-accent-downstep-notation" data-setting="general.showPitchAccentDownstepNotation"> Show downstep notation for pitch accents</label>
- </div>
-
- <div class="checkbox options-advanced">
- <label><input type="checkbox" id="show-pitch-accent-position-notation" data-setting="general.showPitchAccentPositionNotation"> Show position notation for pitch accents</label>
- </div>
-
- <div class="checkbox options-advanced">
- <label><input type="checkbox" id="show-pitch-accent-graph" data-setting="general.showPitchAccentGraph"> Show graph for pitch accents</label>
- </div>
-
- <div class="checkbox options-advanced">
- <label><input type="checkbox" id="show-iframe-popups-in-root-frame" data-setting="general.showIframePopupsInRootFrame"> Show iframe popups in root frame</label>
- </div>
-
- <div class="checkbox options-advanced">
- <label><input type="checkbox" data-setting="general.usePopupWindow"> Use a native popup window when scanning text on web pages</label>
- </div>
-
- <div class="checkbox options-advanced">
- <label><input type="checkbox" data-setting="general.useSecurePopupFrameUrl"> Use secure popup frame URL</label>
- </div>
-
- <div class="checkbox options-advanced">
- <label><input type="checkbox" data-setting="general.usePopupShadowDom"> Use shadow DOM container for popup</label>
- </div>
-
- <div class="checkbox options-advanced">
- <label><input type="checkbox" id="show-debug-info" data-setting="general.debugInfo"
- data-transform='{
- "type": "setAttribute",
- "selector": ":root",
- "attribute": "data-options-general-debug-info"
- }'
- > Show debug information</label>
- </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>
- </div>
-
- <div class="form-group">
- <label for="result-output-mode">Result grouping</label>
- <select class="form-control" id="result-output-mode" data-setting="general.resultOutputMode"
- data-transform='{
- "type": "setAttribute",
- "selector": ":root",
- "attribute": "data-options-general-result-output-mode"
- }'
- >
- <option value="group">Group results by term-reading pairs</option>
- <option value="merge">Group results by main dictionary entry</option>
- <option value="split">Split definitions to their own results</option>
- </select>
- </div>
-
- <div class="form-group">
- <label for="popup-scaling-factor">Popup size multiplier</label>
- <input type="number" min="0" id="popup-scaling-factor" data-setting="general.popupScalingFactor" class="form-control">
- </div>
-
- <div class="form-group options-advanced">
- <label for="max-displayed-results">Maximum displayed results</label>
- <input type="number" min="1" id="max-displayed-results" class="form-control" data-setting="general.maxResults">
- </div>
-
- <div class="form-group">
- <div class="row">
- <div class="col-xs-6">
- <label for="popup-horizontal-text-position">Popup position for horizontal text</label>
- <select class="form-control" id="popup-horizontal-text-position" data-setting="general.popupHorizontalTextPosition">
- <option value="below">Below text</option>
- <option value="above">Above text</option>
- </select>
- </div>
- <div class="col-xs-6">
- <label for="popup-vertical-text-position">Popup position for vertical text</label>
- <select class="form-control" id="popup-vertical-text-position" data-setting="general.popupVerticalTextPosition">
- <option value="default">Same as for horizontal text</option>
- <option value="before">Before text reading direction</option>
- <option value="after">After text reading direction</option>
- <option value="left">Left of text</option>
- <option value="right">Right of text</option>
- </select>
- </div>
- </div>
- </div>
-
- <div class="form-group options-advanced">
- <div class="row">
- <div class="col-xs-6">
- <label for="popup-width">Popup width <span class="label-light">(in pixels)</span></label>
- <input type="number" min="1" id="popup-width" class="form-control" data-setting="general.popupWidth">
- </div>
- <div class="col-xs-6">
- <label for="popup-height">Popup height <span class="label-light">(in pixels)</span></label>
- <input type="number" min="1" id="popup-height" class="form-control" data-setting="general.popupHeight">
- </div>
- </div>
- </div>
-
- <div class="form-group options-advanced">
- <div class="row">
- <div class="col-xs-6">
- <label for="popup-horizontal-offset">Horizontal popup offset <span class="label-light">(in pixels)</span></label>
- <input type="number" id="popup-horizontal-offset" class="form-control" data-setting="general.popupHorizontalOffset">
- </div>
- <div class="col-xs-6">
- <label for="popup-vertical-offset">Vertical popup offset <span class="label-light">(in pixels)</span></label>
- <input type="number" id="popup-vertical-offset" class="form-control" data-setting="general.popupVerticalOffset">
- </div>
- </div>
- </div>
-
- <div class="form-group options-advanced">
- <div class="row">
- <div class="col-xs-6">
- <label for="popup-horizontal-offset2">Horizontal popup offset for vertical text <span class="label-light">(in pixels)</span></label>
- <input type="number" id="popup-horizontal-offset2" class="form-control" data-setting="general.popupHorizontalOffset2">
- </div>
- <div class="col-xs-6">
- <label for="popup-vertical-offset2">Vertical popup offset for vertical text <span class="label-light">(in pixels)</span></label>
- <input type="number" id="popup-vertical-offset2" class="form-control" data-setting="general.popupVerticalOffset2">
- </div>
- </div>
- </div>
-
- <div class="form-group">
- <div class="row">
- <div class="col-xs-6">
- <label for="popup-display-mode">Popup display mode</label>
- <select class="form-control" id="popup-display-mode" data-setting="general.popupDisplayMode">
- <option value="default">Default</option>
- <option value="full-width">Full width</option>
- </select>
- </div>
- <div class="col-xs-6">
- <label for="glossary-layout-mode">Glossary layout mode</label>
- <select class="form-control" id="glossary-layout-mode" data-setting="general.glossaryLayoutMode">
- <option value="default">Default</option>
- <option value="compact">Compact</option>
- </select>
- </div>
- </div>
- </div>
-
- <div class="form-group">
- <div class="row">
- <div class="col-xs-6">
- <label for="popup-theme">Popup theme</label>
- <select class="form-control" id="popup-theme" data-setting="general.popupTheme">
- <option value="default">Light</option>
- <option value="dark">Dark</option>
- </select>
- </div>
- <div class="col-xs-6">
- <label for="popup-outer-theme">Popup shadow theme</label>
- <select class="form-control" id="popup-outer-theme" data-setting="general.popupOuterTheme">
- <option value="auto">Auto-detect</option>
- <option value="default">Light</option>
- <option value="dark">Dark</option>
- </select>
- </div>
- </div>
- </div>
-
- <div class="form-group options-advanced">
- <div class="row">
- <div class="col-xs-6">
- <label for="custom-popup-css">Custom popup CSS</label>
- <div><textarea autocomplete="off" spellcheck="false" wrap="soft" id="custom-popup-css" class="form-control" data-setting="general.customPopupCss"></textarea></div>
- </div>
- <div class="col-xs-6">
- <label for="custom-popup-outer-css">Custom popup outer CSS</label>
- <div><textarea autocomplete="off" spellcheck="false" wrap="soft" id="custom-popup-outer-css" class="form-control" data-setting="general.customPopupOuterCss" placeholder="iframe.yomichan-popup { /*styles*/ }"></textarea></div>
- </div>
- </div>
- </div>
-
- <div class="form-group ignore-form-changes" style="display: none;" id="settings-popup-preview-settings">
- <label for="settings-popup-preview-text">Popup preview text</label>
- <input type="text" id="settings-popup-preview-text" class="form-control" value="読め" placeholder="Preview text">
- </div>
-
- <div class="form-group ignore-form-changes">
- <div id="settings-popup-preview-button-container">
- <button class="btn btn-default" id="settings-popup-preview-button">Show popup preview</button>
- </div>
- <div id="settings-popup-preview-container"></div>
- </div>
- </div>
-
- <div>
- <h3>Audio Options</h3>
-
- <div class="checkbox">
- <label><input type="checkbox" id="audio-playback-enabled" data-setting="audio.enabled"> Enable audio playback in search results</label>
- </div>
-
- <div class="checkbox">
- <label><input type="checkbox" id="auto-play-audio" data-setting="audio.autoPlay"> Play audio automatically</label>
- </div>
-
- <div class="form-group">
- <label for="audio-playback-volume">Audio playback volume <span class="label-light">(percent)</span></label>
- <input type="number" min="0" max="100" id="audio-playback-volume" class="form-control" data-setting="audio.volume">
- </div>
-
- <div class="form-group" id="text-to-speech-voice-container">
- <label for="text-to-speech-voice">Text-to-speech voice</label>
- <div class="input-group">
- <select class="form-control" id="text-to-speech-voice" data-setting="audio.textToSpeechVoice"></select>
- <div class="input-group-btn">
- <button class="btn btn-default" id="text-to-speech-voice-test" title="Test voice"><span class="glyphicon glyphicon-volume-up"></span></button>
- </div>
- </div>
- <input type="text" value="よみちゃん" id="text-to-speech-voice-test-text" hidden>
- </div>
-
- <div class="form-group options-advanced">
- <label for="audio-custom-source">Custom audio source <span class="label-light">(URL)</span></label>
- <input type="text" id="audio-custom-source" class="form-control" data-setting="audio.customSourceUrl" placeholder="Example: http://localhost/audio.mp3?expression={expression}&reading={reading}">
- </div>
-
- <div class="form-group ignore-form-changes">
- <label>Audio playback sources</label>
- <div class="audio-source-list generic-input-list" id="audio-source-list"></div>
- <div class="input-group audio-source-options">
- <button class="btn btn-default audio-source-add" title="Add audio playback source" id="audio-source-add"><span class="glyphicon glyphicon-plus"></span></button>
- </div>
-
- <template id="audio-source-template"><div class="input-group audio-source">
- <div class="input-group-addon generic-input-prefix"></div>
- <select class="form-control audio-source-select">
- <option value="jpod101">JapanesePod101</option>
- <option value="jpod101-alternate">JapanesePod101 (Alternate)</option>
- <option value="jisho">Jisho.org</option>
- <option value="text-to-speech">Text-to-speech</option>
- <option value="text-to-speech-reading">Text-to-speech (Kana reading)</option>
- <option value="custom">Custom</option>
- </select>
- <div class="input-group-btn"><button class="btn btn-danger audio-source-remove" title="Remove"><span class="glyphicon glyphicon-remove"></span></button></div>
- </div></template>
- </div>
- </div>
-
- <div>
- <h3>Scanning Options</h3>
-
- <div class="checkbox options-non-advanced">
- <label><input type="checkbox" id="middle-mouse-button-scan"> Middle mouse button scans</label>
- </div>
-
- <div class="checkbox">
- <label><input type="checkbox" id="select-matched-text" data-setting="scanning.selectText"> Select matched text</label>
- </div>
-
- <div class="checkbox">
- <label><input type="checkbox" id="search-alphanumeric" data-setting="scanning.alphanumeric"> Search alphanumeric text</label>
- </div>
-
- <div class="checkbox">
- <label><input type="checkbox" id="auto-hide-results" data-setting="scanning.autoHideResults"> Automatically hide results</label>
- </div>
-
- <div class="checkbox">
- <label><input type="checkbox" id="layout-aware-scan" data-setting="scanning.layoutAwareScan"> Layout-aware scan</label>
- </div>
-
- <div class="checkbox options-advanced">
- <label><input type="checkbox" id="touch-input-enabled" data-setting="scanning.touchInputEnabled"> Touch input enabled</label>
- </div>
-
- <div class="checkbox options-advanced">
- <label><input type="checkbox" data-setting="scanning.pointerEventsEnabled"> Pointer events input enabled</label>
- </div>
-
- <div class="checkbox options-advanced">
- <label><input type="checkbox" id="deep-dom-scan" data-setting="scanning.deepDomScan"> Deep content scan</label>
- </div>
-
- <div class="checkbox options-advanced">
- <strong>Prevent middle mouse button actions on:</strong>
- <div style="margin-left: 1em;">
- <label><input type="checkbox" data-setting="scanning.preventMiddleMouse.onWebPages"> Webpages</label><br>
- <label><input type="checkbox" data-setting="scanning.preventMiddleMouse.onPopupPages"> Popups</label><br>
- <label><input type="checkbox" data-setting="scanning.preventMiddleMouse.onSearchPages"> Search page</label><br>
- <label><input type="checkbox" data-setting="scanning.preventMiddleMouse.onSearchQuery"> Search query</label><br>
- </div>
- </div>
-
- <div class="form-group options-advanced">
- <div class="row">
- <div class="col-xs-6">
- <label for="scan-delay">Scan delay <span class="label-light">(in milliseconds)</span></label>
- <input type="number" min="0" id="scan-delay" class="form-control" data-setting="scanning.delay">
- </div>
- <div class="col-xs-6">
- <label for="scan-close-delay">Auto-hide delay <span class="label-light">(in milliseconds)</span></label>
- <input type="number" min="0" id="scan-close-delay" class="form-control" data-setting="scanning.hideDelay">
- </div>
- </div>
- </div>
-
- <div class="form-group options-advanced">
- <label for="scan-length">Scan length <span class="label-light">(in characters)</span></label>
- <input type="number" min="1" step="1" id="scan-length" class="form-control" data-setting="scanning.length">
- </div>
-
- <div class="form-group options-non-advanced">
- <label for="main-scan-modifier-key">Scan modifier key</label>
- <select class="form-control" id="main-scan-modifier-key"></select>
- </div>
-
- <div class="form-group options-advanced">
- <label>Scan inputs</label>
- <div class="scan-input-list" id="scan-input-list"></div>
- <button class="btn btn-default" id="scan-input-add" title="Add scan input"><span class="glyphicon glyphicon-plus"></span></button>
-
- <template id="scan-input-template"><div class="scan-input">
- <div class="scan-input-grid">
- <div class="scan-input-index-cell"><div class="scan-input-index"></div></div>
-
- <div class="scan-input-prefix-cell" data-property="include"><div class="scan-input-prefix">Include</div></div>
- <div class="scan-input-content-cell" data-property="include"><div class="scan-input-input-cell-inner">
- <input type="text" class="form-control scan-input-field" placeholder="No inputs" data-property="include">
- <button class="btn btn-default mouse-button" title="Mouse button" data-property="include"><span class="mouse-button-icon"></span></button>
- </div></div>
- <div class="scan-input-suffix-cell"><button class="btn btn-danger scan-input-remove" title="Remove"><span class="glyphicon glyphicon-remove"></span></button></div>
-
- <div class="scan-input-prefix-cell" data-property="exclude"><div class="scan-input-prefix">Exclude</div></div>
- <div class="scan-input-content-cell" data-property="exclude"><div class="scan-input-input-cell-inner">
- <input type="text" class="form-control scan-input-field" placeholder="No inputs" data-property="exclude">
- <button class="btn btn-default mouse-button" title="Mouse button" data-property="exclude"><span class="mouse-button-icon"></span></button>
- </div></div>
-
- <div class="scan-input-prefix-cell" data-property="types"><div class="scan-input-prefix">Types</div></div>
- <div class="scan-input-content-cell" data-property="types"><div class="scan-input-input-cell-inner">
- <div class="scan-input-type-list-container form-control"><div class="scan-input-type-list">
- <label class="scan-input-toggle scan-input-type"><input type="checkbox" class="scan-input-settings-checkbox" data-property="types.mouse"><span>Mouse</span></label>
- <label class="scan-input-toggle scan-input-type"><input type="checkbox" class="scan-input-settings-checkbox" data-property="types.touch"><span>Touch</span></label>
- <label class="scan-input-toggle scan-input-type"><input type="checkbox" class="scan-input-settings-checkbox" data-property="types.pen"><span>Pen</span></label>
- <label class="scan-input-toggle scan-input-type"><input type="checkbox" class="scan-input-settings-checkbox" data-property="options.showAdvanced"
- data-transform='{
- "type": "setAttribute",
- "ancestorDistance": 7,
- "attribute": "data-show-advanced"
- }'
- ><span>Advanced</span></label>
- </div></div>
- </div></div>
-
- <div class="scan-input-prefix-cell" data-property="options"><div class="scan-input-prefix">Options</div></div>
- <div class="scan-input-content-cell" data-property="options"><div class="scan-input-input-cell-inner">
- <div class="scan-input-type-list-container form-control"><div>
- <div><label class="scan-input-toggle"><input type="checkbox" class="scan-input-settings-checkbox" data-property="options.searchTerms"><span>Search for terms</span></label></div>
- <div><label class="scan-input-toggle"><input type="checkbox" class="scan-input-settings-checkbox" data-property="options.searchKanji"><span>Search for kanji</span></label></div>
- <div><label class="scan-input-toggle"><input type="checkbox" class="scan-input-settings-checkbox" data-property="options.scanOnTouchMove"><span>Scan on touch move</span></label></div>
- <div><label class="scan-input-toggle"><input type="checkbox" class="scan-input-settings-checkbox" data-property="options.scanOnPenHover"><span>Scan on pen hover</span></label></div>
- <div><label class="scan-input-toggle"><input type="checkbox" class="scan-input-settings-checkbox" data-property="options.scanOnPenPress"><span>Scan on pen press</span></label></div>
- <div><label class="scan-input-toggle"><input type="checkbox" class="scan-input-settings-checkbox" data-property="options.scanOnPenRelease"><span>Scan on pen release</span></label></div>
- <div><label class="scan-input-toggle"><input type="checkbox" class="scan-input-settings-checkbox" data-property="options.preventTouchScrolling"><span>Prevent touch/pen scrolling</span></label></div>
- </div></div>
- </div></div>
- </div>
- </div></template>
- </div>
- </div>
-
- <div>
- <h3>Translation Options</h3>
-
- <p class="help-block">
- The following options can be used during the translation process to provide alternate versions of the input text to search for.
- This can be helpful when the input text doesn't exactly match the term or expression found in the database.
- </p>
-
- <p class="help-block">
- The conversion options below are listed in the order that the conversions are applied to the input text.
- Conversions commonly have three possible values:
- </p>
-
- <ul class="help-block">
- <li>
- <strong>Disabled</strong><br>
- This conversion will never be applied to the input text.
- </li>
- <li>
- <strong>Enabled</strong><br>
- This conversion will always be applied to the input text.
- </li>
- <li>
- <strong>Use both variants</strong><br>
- The translator will check the database for two variations: the raw input text and the converted input text.
- When multiple options use variants, the translator will search for combinations of the converted text.
- </li>
- </ul>
-
- <div class="form-group">
- <label for="translation-convert-half-width-characters">Convert half width characters to full width <span class="label-light">(ヨミチャン &rarr; ヨミチャン)</span></label>
- <select class="form-control" id="translation-convert-half-width-characters" data-setting="translation.convertHalfWidthCharacters">
- <option value="false">Disabled</option>
- <option value="true">Enabled</option>
- <option value="variant">Use both variants</option>
- </select>
- </div>
-
- <div class="form-group">
- <label for="translation-convert-numeric-characters">Convert numeric characters to full width <span class="label-light">(1234 &rarr; 1234)</span></label>
- <select class="form-control" id="translation-convert-numeric-characters" data-setting="translation.convertNumericCharacters">
- <option value="false">Disabled</option>
- <option value="true">Enabled</option>
- <option value="variant">Use both variants</option>
- </select>
- </div>
-
- <div class="form-group">
- <label for="translation-convert-alphabetic-characters">Convert alphabetic characters to hiragana <span class="label-light">(yomichan &rarr; よみちゃん)</span></label>
- <select class="form-control" id="translation-convert-alphabetic-characters" data-setting="translation.convertAlphabeticCharacters">
- <option value="false">Disabled</option>
- <option value="true">Enabled</option>
- <option value="variant">Use both variants</option>
- </select>
- </div>
-
- <div class="form-group">
- <label for="translation-convert-hiragana-to-katakana">Convert hiragana to katakana <span class="label-light">(よみちゃん &rarr; ヨミチャン)</span></label>
- <select class="form-control" id="translation-convert-hiragana-to-katakana" data-setting="translation.convertHiraganaToKatakana">
- <option value="false">Disabled</option>
- <option value="true">Enabled</option>
- <option value="variant">Use both variants</option>
- </select>
- </div>
-
- <div class="form-group">
- <label for="translation-convert-katakana-to-hiragana">Convert katakana to hiragana <span class="label-light">(ヨミチャン &rarr; よみちゃん)</span></label>
- <select class="form-control" id="translation-convert-katakana-to-hiragana" data-setting="translation.convertKatakanaToHiragana">
- <option value="false">Disabled</option>
- <option value="true">Enabled</option>
- <option value="variant">Use both variants</option>
- </select>
- </div>
-
- <div class="form-group">
- <label for="translation-collapse-emphatic-sequences">Collapse emphatic character sequences <span class="label-light">(すっっごーーい &rarr; すっごーい / すごい)</span></label>
- <select class="form-control" id="translation-collapse-emphatic-sequences" data-setting="translation.collapseEmphaticSequences">
- <option value="false">Disabled</option>
- <option value="true">Collapse into single character</option>
- <option value="full">Remove all characters</option>
- </select>
- </div>
- </div>
-
- <div id="popup-content-scanning">
- <h3>Popup Content Scanning Options</h3>
-
- <p class="help-block">
- Yomichan is able to create additional popups in order to scan the content of other popups.
- This feature can be enabled if the <strong>Maximum number of additional popups</strong> option is set to a value greater than 0.
- </p>
-
- <div class="checkbox">
- <label><input type="checkbox" id="enable-search-within-first-popup" data-setting="scanning.enablePopupSearch"> Enable search when clicking glossary entries and tags</label>
- </div>
-
- <div class="checkbox">
- <label><input type="checkbox" id="enable-scanning-on-search-page" data-setting="scanning.enableOnSearchPage"> Enable scanning on search page</label>
- </div>
-
- <div class="checkbox">
- <label><input type="checkbox" id="enable-scanning-of-popup-expressions" data-setting="scanning.enableOnPopupExpressions"> Enable scanning of expressions in search results</label>
- </div>
-
- <div class="checkbox">
- <label><input type="checkbox" id="enable-search-tags" data-setting="scanning.enableSearchTags"> Enable clickable and scannable tags for searching expressions and their readings</label>
- </div>
-
- <div class="form-group">
- <label for="popup-nesting-max-depth">Maximum number of additional popups</label>
- <input type="number" min="0" step="1" id="popup-nesting-max-depth" class="form-control" data-setting="scanning.popupNestingMaxDepth">
- </div>
- </div>
-
- <div id="text-parsing">
- <h3>Text Parsing Options</h3>
-
- <p class="help-block">
- Yomichan can attempt to parse entire sentences or longer text blocks on the search page,
- adding furigana above words and a small space between words.
- </p>
-
- <p class="help-block">
- Two types of parsers are supported. The first one, enabled by default, works using the built-in
- scanning functionality by automatically advancing in the sentence after a matching word.
- </p>
-
- <p class="help-block">
- The second type is an external program called <a href="https://en.wikipedia.org/wiki/MeCab" target="_blank" rel="noopener">MeCab</a>
- that uses its own dictionaries and a special parsing algorithm. To get it working, you must first
- install it and <a href="https://github.com/siikamiika/yomichan-mecab-installer" target="_blank" rel="noopener">a native messaging component</a>
- that acts as a bridge between the program and Yomichan.
- </p>
-
- <div class="checkbox">
- <label><input type="checkbox" id="parsing-scan-enable" data-setting="parsing.enableScanningParser"> Enable text parsing using installed dictionaries</label>
- </div>
-
- <div class="checkbox">
- <label><input type="checkbox" id="parsing-mecab-enable" class="permissions-toggle" data-permissions-setting="parsing.enableMecabParser" data-required-permissions="nativeMessaging"> Enable text parsing using MeCab</label>
- </div>
-
- <div class="checkbox">
- <label><input type="checkbox" id="parsing-term-spacing" data-setting="parsing.termSpacing"> Enable small spaces between parsed words</label>
- </div>
-
- <div class="form-group">
- <label for="parsing-reading-mode">Reading mode</label>
- <select class="form-control" id="parsing-reading-mode" data-setting="parsing.readingMode">
- <option value="hiragana">ひらがな</option>
- <option value="katakana">カタカナ</option>
- <option value="romaji">Romaji</option>
- <option value="none">Disabled</option>
- </select>
- </div>
- </div>
-
- <div class="ignore-form-changes">
- <div>
- <img src="/images/spinner.gif" class="pull-right" id="dictionary-spinner" alt="" hidden>
- <h3>Dictionaries</h3>
- </div>
-
- <p class="help-block">
- Yomichan can import and use a variety of dictionary formats. Unneeded dictionaries can be disabled.
- </p>
-
- <div class="form-group" id="dictionary-main-group">
- <label for="dictionary-main">Main dictionary for merged mode</label>
- <select class="form-control" id="dictionary-main" data-setting="general.mainDictionary"></select>
- </div>
-
- <div class="text-danger" id="dictionary-delete-all-status" hidden>Dictionary data is being purged, please be patient...</div>
- <div class="alert alert-warning no-dictionaries-installed-warning" hidden>No dictionaries have been installed</div>
- <div class="alert alert-danger" id="dictionary-error" hidden></div>
-
- <div id="dictionary-list"></div>
- <div id="dictionary-list-extra"></div>
-
- <div id="dictionary-import-progress-container" hidden>
- Dictionary data is being imported, please be patient...
- <span id="dictionary-import-info" hidden></span>
- <div class="progress">
- <div class="progress-bar progress-bar-striped" style="width: 0%"></div>
- </div>
- </div>
-
- <div>
- <p class="help-block">
- Select a dictionary to import for use below. Please visit the Yomichan homepage to
- <a href="https://foosoft.net/projects/yomichan" target="_blank" rel="noopener">download free dictionaries</a>
- for use with this extension and to learn about importing proprietary EPWING dictionaries.
- </p>
- <div>
- <button class="btn btn-primary dictionary-database-mutating-input" id="dictionary-import-file-button">Import Dictionary</button>
- <button class="btn btn-danger dictionary-database-mutating-input" id="dictionary-delete-all-button">Purge Database</button>
- <button class="btn btn-default dictionary-database-mutating-input" id="dictionary-check-integrity">Check integrity</button>
- </div>
- <div hidden><input type="file" id="dictionary-import-file-input" accept=".zip,application/zip" multiple></div>
- </div>
-
- <div>
- <h3>Dictionary Options</h3>
- </div>
-
- <div class="checkbox">
- <label><input type="checkbox" id="database-enable-prefix-wildcard-searches" data-setting="global.database.prefixWildcardsSupported" data-scope="global"> Enable prefix wildcard searches</label>
- <p class="help-block">
- This option only applies to newly imported dictionaries.
- Enabling this option will also cause dictionary data to take up slightly more storage space.
- </p>
- </div>
-
- <div class="modal fade" tabindex="-1" role="dialog" id="dictionary-confirm-delete-all">
- <div class="modal-dialog modal-dialog-centered">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
- <h4 class="modal-title">Confirm database purge</h4>
- </div>
- <div class="modal-body">
- Are you sure you want to delete all data in the database?
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
- <button type="button" class="btn btn-danger" id="dictionary-confirm-delete-all-button">Purge Database</button>
- </div>
- </div>
- </div>
- </div>
-
- <div class="modal fade" tabindex="-1" role="dialog" id="dictionary-confirm-delete">
- <div class="modal-dialog modal-dialog-centered">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
- <h4 class="modal-title">Confirm dictionary deletion</h4>
- </div>
- <div class="modal-body">
- Are you sure you want to delete the dictionary <em id="dictionary-confirm-delete-name"></em>?
- This operation may take some time and the responsiveness of this browser tab may be reduced.
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
- <button type="button" class="btn btn-danger dictionary-database-mutating-input" id="dictionary-confirm-delete-button">Delete Dictionary</button>
- </div>
- </div>
- </div>
- </div>
-
- <template id="dictionary-template"><div class="well well-sm">
- <h4><span class="text-muted glyphicon glyphicon-book"></span> <span class="dictionary-title"></span> <small class="dictionary-version"></small></h4>
- <p class="text-warning dictionary-outdated-notification" hidden>This dictionary is outdated and may not support new extension features; please import the latest version.</p>
-
- <div class="checkbox">
- <label><input type="checkbox" class="dictionary-enabled"> Enable search</label>
- </div>
- <div class="checkbox options-advanced">
- <label><input type="checkbox" class="dictionary-allow-secondary-searches"> Allow secondary searches</label>
- </div>
- <div class="checkbox">
- <label><input type="checkbox" class="dictionary-prefix-wildcard-searches-supported" disabled> Prefix wildcard searches supported</label>
- </div>
- <div class="form-group options-advanced">
- <label>Result priority</label>
- <input type="number" class="form-control dictionary-priority">
- </div>
- <div class="dictionary-details-container">
- <a class="dictionary-details-toggle-link">Details...</a>
- <div class="dictionary-details" hidden><div class="dictionary-details-table"></div></div>
- </div>
- <div class="dictionary-delete-table">
- <div>
- <button class="btn btn-default dictionary-delete-button dictionary-database-mutating-input">Delete Dictionary</button>
- </div>
- <div class="progress-container" hidden>
- <div class="progress">
- <div class="progress-bar progress-bar-striped" style="width: 0%"></div>
- </div>
- </div>
- </div>
- <pre class="debug dictionary-counts" hidden></pre>
- </div></template>
-
- <template id="dictionary-details-entry-template"><div class="dictionary-details-entry">
- <span class="dictionary-details-entry-label"></span>
- <span class="dictionary-details-entry-info"></span>
- </div></template>
-
- <template id="dictionary-extra-template"><div class="well well-sm">
- <h4><span class="text-muted glyphicon glyphicon-alert"></span> <span class="dictionary-title">Unassociated Data</span> <small class="dictionary-total-count"></small></h4>
- <p class="text-warning">
- The database contains extra data which is not associated with any installed dictionary.
- Purging the database can fix this issue.
- </p>
- <pre class="debug dictionary-counts" hidden></pre>
- </div></template>
- </div>
-
- <div id="storage-info">
- <div>
- <h3>Storage</h3>
- </div>
-
- <div id="storage-persistent-info" hidden>
- <p class="help-block">
- Web browsers may sometimes clear stored data if the device is running low on storage space.
- This can result in the stored dictionary data being deleted unexpectedly, causing Yomichan to stop working for no apparent reason.
- In order to prevent this, persistent storage must be enable by clicking the "Persistent Storage" button below.
- </p>
- </div>
-
- <div id="storage-use">
- <p class="help-block storage-use-invalid">
- Yomichan is using an indeterminate amount of storage.
- </p>
- <p class="help-block storage-use-finite" hidden>
- Yomichan is using approximately <strong class="storage-usage"></strong> of <strong class="storage-quota"></strong>.
- </p>
- <p class="help-block storage-use-infinite" hidden>
- Yomichan is permitted <strong>unlimited storage</strong>.
- </p>
- </div>
-
- <div id="storage-error" hidden>
- <p class="help-block">
- Could not detect how much storage Yomichan is using.
- </p>
- <div data-show-for-browser="firefox firefox-mobile"><div class="alert alert-danger options-advanced">
- On Firefox and Firefox for Android, the storage information feature may be hidden behind a browser flag.
-
- If you would like to enable this flag, open <a href="about:config" target="_blank" rel="noopener">about:config</a> and search for the
- <strong>dom.storageManager.enabled</strong> option. If this option has a value of <strong>false</strong>, toggling it to
- <strong>true</strong> may allow storage information to be calculated.
- </div></div>
- </div>
-
- <div data-show-for-browser="firefox-mobile"><div class="alert alert-warning">
- If you are using Firefox for Android, you will have to make sure you have enough free space on your device to install dictionaries.
- </div></div>
-
- <div>
- <button class="btn btn-default" id="storage-refresh"><span class="btn-inner-middle">Refresh</span></button>
- <button class="btn btn-default ignore-form-changes" id="storage-persistent-button" hidden><span class="storage-button-inner"><input type="checkbox" class="btn-inner-middle storage-button-checkbox" id="storage-persistent-checkbox" readonly><span class="btn-inner-middle">Persistent Storage</span></span></button>
- </div>
-
- <p></p>
-
- <div id="storage-persistent-fail-warning" hidden>
- <div data-show-for-browser="firefox-mobile"><div class="alert alert-warning">
- <p>It may not be possible to enable Persistent Storage on Firefox for Android.</p>
- </div></div>
-
- <div data-show-for-browser="chrome"><div class="alert alert-warning">
- <p>
- It may not be possible to enable Persistent Storage on Chrome-based browsers.
- However, the Yomichan extension has permission for unlimited storage which should
- prevent Chrome from deleting data.<sup><a href="https://bugs.chromium.org/p/chromium/issues/detail?id=680392#c15" target="_blank" rel="noopener">[1]</a></sup>
- </p>
- </div></div>
- </div>
- </div>
-
- <div>
- <div>
- <img src="/images/spinner.gif" class="pull-right" id="anki-spinner" alt="" hidden>
- <h3>Anki Options</h3>
- </div>
-
- <p class="help-block">
- Yomichan supports automatic flashcard creation for <a href="https://apps.ankiweb.net/" target="_blank" rel="noopener">Anki</a>, a free application
- designed to help you remember. This feature requires installation of the
- <a href="https://foosoft.net/projects/anki-connect/" target="_blank" rel="noopener">AnkiConnect</a> plugin.
- </p>
-
- <div class="checkbox">
- <label><input type="checkbox" id="anki-enable" data-setting="anki.enable"
- data-transform='{
- "type": "setAttribute",
- "selector": ":root",
- "attribute": "data-options-anki-enable"
- }'
- > Enable Anki integration</label>
- </div>
-
- <div id="anki-general">
- <div data-show-for-operating-system="mac">
- <div class="alert alert-warning" id="anki-mac-warning">
- Notice for Mac OS X users:
- If Yomichan has issues connecting to AnkiConnect, you may have to tweak some system settings.
- See <a href="https://foosoft.net/projects/anki-connect/#notes-for-mac-os-x-users" target="_blank" rel="noopener">this link</a> for more details.
- </div>
- </div>
-
- <div class="alert alert-danger" id="anki-error" hidden>
- <span id="anki-error-message"></span><a id="anki-error-message-details-toggle">&hellip;</a>
- <div id="anki-error-message-details-container" hidden><div id="anki-error-message-details"></div></div>
- </div>
-
- <div class="alert alert-danger" id="anki-error-invalid-response-info" hidden>
- Attempting to connect to Anki can sometimes return an error message which includes "Invalid response",
- which may indicate that the value of the <strong>Interface server</strong> option is incorrect.
- The <strong>Show advanced options</strong> checkbox under General Options must be ticked ticked to show this option.
- Resetting it to the default value may fix issues that are occurring.
- </div>
-
- <div class="form-group">
- <label for="card-tags">Card tags <span class="label-light">(comma or space separated)</span></label>
- <input type="text" id="card-tags" class="form-control" data-setting="anki.tags"
- data-transform='[
- {"type": "splitTags", "step": "pre"},
- {"type": "joinTags", "step": "post"}
- ]'
- >
- </div>
-
- <div class="form-group options-advanced">
- <label for="sentence-detection-extent">Sentence detection extent <span class="label-light">(in characters)</span></label>
- <input type="number" min="0" step="1" id="sentence-detection-extent" class="form-control" data-setting="sentenceParsing.scanExtent">
- </div>
-
- <div class="form-group options-advanced">
- <label for="interface-server">Interface server <span class="label-light">(Default: http://127.0.0.1:8765)</span></label>
- <input type="text" id="interface-server" class="form-control" data-setting="anki.server">
- </div>
-
- <div class="form-group options-advanced">
- <label>Duplicates</label><br>
- <label style="font-weight: normal;"><input type="checkbox" data-setting="anki.checkForDuplicates"> Check for duplicate cards</label><br>
- </div>
-
- <div class="form-group options-advanced">
- <label for="duplicate-scope">Duplicate scope</label>
- <select class="form-control" id="duplicate-scope" data-setting="anki.duplicateScope">
- <option value="collection">Collection</option>
- <option value="deck">Deck</option>
- <option value="deck-root">Deck root</option>
- </select>
- </div>
-
- <div class="form-group options-advanced">
- <label for="screenshot-format">Screenshot format</label>
- <select class="form-control" id="screenshot-format" data-setting="anki.screenshot.format">
- <option value="png">PNG</option>
- <option value="jpeg">JPEG</option>
- </select>
- </div>
-
- <div class="form-group options-advanced">
- <label for="screenshot-quality">Screenshot quality <span class="label-light">(JPEG only)</span></label>
- <input type="number" min="0" max="100" step="1" id="screenshot-quality" class="form-control" data-setting="anki.screenshot.quality">
- </div>
-
- <div id="anki-format">
- <p class="help-block">
- Specify the information you would like included in your flashcards in the field editor below.
- As Anki requires the first field in the model to be unique, it is recommended
- that you set it to <code>{expression}</code> for term flashcards and <code>{character}</code> for
- Kanji flashcards. You can use multiple markers per field by typing them in directly.
- See <a href="https://foosoft.net/projects/yomichan#flashcard-configuration" target="_blank" rel="noopener">Flashcard Configuration</a>
- on the Yomichan homepage for descriptions of the available markers.
- </p>
-
- <ul class="nav nav-tabs">
- <li class="active"><a href="#terms" data-toggle="tab">Terms</a></li>
- <li><a href="#kanji" data-toggle="tab">Kanji</a></li>
- </ul>
-
- <div class="tab-content ignore-form-changes" id="anki-fields-container">
- <div id="terms" class="tab-pane fade in active anki-card" data-anki-card-type="terms">
- <div class="row">
- <div class="form-group col-xs-6">
- <label for="anki-terms-deck">Deck</label>
- <select class="form-control anki-card-deck" id="anki-terms-deck" data-anki-card-type="terms"></select>
- </div>
-
- <div class="form-group col-xs-6">
- <label for="anki-terms-model">Model</label>
- <select class="form-control anki-card-model" id="anki-terms-model" data-anki-card-type="terms"></select>
- </div>
- </div>
-
- <table class="table table-bordered anki-fields">
- <thead><tr><th>Field</th><th>Value</th></tr></thead>
- <tbody class="anki-card-fields"></tbody>
- </table>
- </div>
-
- <div id="kanji" class="tab-pane fade anki-card" data-anki-card-type="kanji">
- <div class="row">
- <div class="form-group col-xs-6">
- <label for="anki-kanji-deck">Deck</label>
- <select class="form-control anki-card-deck" id="anki-kanji-deck" data-anki-card-type="kanji"></select>
- </div>
-
- <div class="form-group col-xs-6">
- <label for="anki-kanji-model">Model</label>
- <select class="form-control anki-card-model" id="anki-kanji-model" data-anki-card-type="kanji"></select>
- </div>
- </div>
-
- <table class="table table-bordered anki-fields">
- <thead><tr><th>Field</th><th>Value</th></tr></thead>
- <tbody class="anki-card-fields"></tbody>
- </table>
- </div>
- </div>
-
- <div class="options-advanced">
- <p class="help-block">
- Fields are formatted using the <a href="https://handlebarsjs.com/" target="_blank" rel="noopener">Handlebars.js</a> template rendering
- engine. Advanced users can modify these templates for ultimate control of what information gets included in
- their Anki cards. If you encounter problems with your changes, you can always reset to the default template settings.
- </p>
- <div class="ignore-form-changes">
- <textarea autocomplete="off" spellcheck="false" wrap="soft" class="form-control" rows="10" id="anki-card-templates-textarea"></textarea>
- </div>
- <div>
- <button class="btn btn-danger" id="anki-card-templates-reset-button">Reset Templates</button>
- </div>
- <p></p>
- <pre id="anki-card-templates-compile-result" hidden></pre>
-
- <p>Templates can be tested using the inputs below.</p>
-
- <div class="form-group">
- <div class="row">
- <div class="col-xs-6">
- <label for="anki-card-templates-test-text-input">Preview text</label>
- <input type="text" id="anki-card-templates-test-text-input" class="form-control" value="読め" placeholder="Preview text">
- </div>
- <div class="col-xs-6">
- <label for="anki-card-templates-test-field-input">Test field</label>
- <div class="input-group">
- <div class="input-group-btn">
- <button class="btn btn-default" id="anki-card-templates-test-render-button" title="Test"><span class="glyphicon glyphicon-play"></span></button>
- </div>
- <input type="text" class="form-control" id="anki-card-templates-test-field-input" value="{expression}" placeholder="{marker}">
- <div class="input-group-btn">
- <button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
- <ul class="dropdown-menu dropdown-menu-right" id="anki-card-templates-field-list"></ul>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <p></p>
- <pre id="anki-card-templates-render-result" hidden></pre>
- </div>
-
- <div class="modal fade" tabindex="-1" role="dialog" id="anki-card-templates-reset">
- <div class="modal-dialog modal-dialog-centered">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
- <h4 class="modal-title">Confirm template reset</h4>
- </div>
- <div class="modal-body">
- Are you sure you want to reset the field templates to the default value?
- Any changes you made will be lost.
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
- <button type="button" class="btn btn-danger" id="anki-card-templates-reset-button-confirm">Reset Templates</button>
- </div>
- </div>
- </div>
- </div>
-
- <template id="anki-card-field-template"><tr>
- <td class="col-sm-2 anki-card-field-name-container"><span class="anki-card-field-name"></span></td>
- <td class="col-sm-10">
- <div class="input-group anki-card-field-value-container">
- <input type="text" class="anki-card-field-value form-control" data-field="" value="">
- <div class="input-group-btn">
- <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
- <span class="caret"></span>
- </button>
- <ul class="dropdown-menu dropdown-menu-right anki-card-field-marker-list"></ul>
- </div>
- </div>
- </td>
- </tr></template>
-
- <template id="anki-card-field-marker-template"><li><a class="marker-link" href="#"></a></li></template>
- </div>
- </div>
- </div>
-
- <div>
- <h3>Keyboard Shortcuts</h3>
-
- <p class="help-block">
- Yomichan includes keyboard shortcuts for common actions which can be adjusted
- using the web browser's settings.
- Instructions on how to access this settings page are listed below for a few browsers.
- </p>
-
- <h4>Chrome</h4>
- <ul class="help-block">
- <li>Open the settings page (<a href="chrome://settings/">chrome://settings/</a>)</li>
- <li>Click the "Extensions" link in the left sidebar (<a href="chrome://extensions/">chrome://extensions/</a>)</li>
- <li>Open the left side panel using the hamburger (<strong>&#8801;</strong>) menu button, then click "Keyboard shortcuts"</li>
- </ul>
-
- <h4>Firefox</h4>
- <ul class="help-block">
- <li>Open the extensions page (<a href="about:addons">about:addons</a>)</li>
- <li>Click the button on the right with the gear icon, then click "Manage Extension Shortcuts"</li>
- </ul>
- </div>
-
-
- <div>
- <h3>Backup</h3>
-
- <p class="help-block">
- Yomichan can import and export settings files which can be used to restore settings,
- share settings across devices, or help to debug problems.
- These files will only contain settings and will not contain dictionaries.
- Dictionaries must be imported separately.
- </p>
-
- <div>
- <button class="btn btn-default" id="settings-export-button">Export Settings</button>
- <button class="btn btn-default" id="settings-import-button">Import Settings</button>
- <button class="btn btn-danger" id="settings-reset-button">Reset Default Settings</button>
- </div>
-
- <div hidden><input type="file" id="settings-import-file" accept=".json,application/json"></div>
-
- <div class="modal fade" tabindex="-1" role="dialog" id="settings-import-error">
- <div class="modal-dialog modal-dialog-centered">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
- <h4 class="modal-title">Import Error</h4>
- </div>
- <div class="modal-body">
- <p>
- An error occurred while trying to import the settings file:
- </p>
- <p class="text-danger" id="settings-import-error-message"></p>
- <p>
- Additional info can be found in the developer console.
- </p>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
- </div>
- </div>
- </div>
- </div>
-
- <div class="modal fade" tabindex="-1" role="dialog" id="settings-import-warning">
- <div class="modal-dialog modal-dialog-centered">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
- <h4 class="modal-title">Import Security Warning</h4>
- </div>
- <div class="modal-body">
- <p>
- Settings file contains settings which may pose a security risk.
- Only import settings from sources you trust.
- </p>
- <ul class="text-danger" id="settings-import-warning-message"></ul>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
- <button type="button" class="btn btn-danger settings-import-warning-import-button">Import</button>
- <button type="button" class="btn btn-primary settings-import-warning-import-button" data-import-sanitize="true">Sanitize and Import</button>
- </div>
- </div>
- </div>
- </div>
-
- <div class="modal fade" tabindex="-1" role="dialog" id="settings-reset">
- <div class="modal-dialog modal-dialog-centered">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
- <h4 class="modal-title">Settings Reset</h4>
- </div>
- <div class="modal-body">
- <p class="text-danger">
- You are about to reset all Yomichan settings back to their default values.
- This will delete all custom profiles you may have created.
- <strong>This action cannot be undone.</strong>
- </p>
- <p>
- Consider making a backup using the "Export Settings" button before resetting
- if you want to be able to revert.
- </p>
- <p>
- Dictionary data will not be deleted, but any installed dictionaries
- will need to be re-enabled.
- </p>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
- <button type="button" class="btn btn-danger" id="settings-reset-confirm-button">Reset All Settings</button>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <div>
- <h3>Support Development</h3>
-
- <p class="help-block">
- Yomichan is provided to you <em>completely free</em> of charge. Unlike numerous other "free" services, you are not
- shown ads, pestered with "offers", or have your browser usage information analyzed and sold to third parties.
- </p>
- <p class="help-block">
- If you find Yomichan useful, please consider making a small donation as a way to show your appreciation for the
- countless hours that I have devoted to this extension.
- </p>
- <p>
- <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=4DBTN9A3CUAFN" target="_blank" rel="noopener"><img src="/images/paypal.gif" alt=""></a>
- </p>
- </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>
- </div>
- </div>
-
- <script src="/mixed/lib/jquery.min.js"></script>
- <script src="/mixed/lib/bootstrap/js/bootstrap.min.js"></script>
- <script src="/mixed/lib/jszip.min.js"></script>
- <script src="/mixed/lib/wanakana.min.js"></script>
-
- <script src="/mixed/js/core.js"></script>
- <script src="/mixed/js/yomichan.js"></script>
- <script src="/mixed/js/comm.js"></script>
- <script src="/mixed/js/environment.js"></script>
- <script src="/mixed/js/api.js"></script>
- <script src="/mixed/js/japanese.js"></script>
-
- <script src="/mixed/js/audio-system.js"></script>
- <script src="/mixed/js/cache-map.js"></script>
- <script src="/mixed/js/dictionary-data-util.js"></script>
- <script src="/mixed/js/document-util.js"></script>
- <script src="/mixed/js/dom-data-binder.js"></script>
- <script src="/mixed/js/html-template-collection.js"></script>
- <script src="/mixed/js/hotkey-util.js"></script>
- <script src="/mixed/js/object-property-accessor.js"></script>
- <script src="/mixed/js/selector-observer.js"></script>
- <script src="/mixed/js/task-accumulator.js"></script>
- <script src="/mixed/js/text-to-speech-audio.js"></script>
-
- <script src="/bg/js/anki.js"></script>
- <script src="/bg/js/anki-note-builder.js"></script>
- <script src="/bg/js/options.js"></script>
- <script src="/bg/js/database.js"></script>
- <script src="/bg/js/dictionary-database.js"></script>
- <script src="/bg/js/dictionary-importer.js"></script>
- <script src="/bg/js/json-schema.js"></script>
- <script src="/bg/js/media-utility.js"></script>
- <script src="/bg/js/permissions-util.js"></script>
- <script src="/bg/js/template-patcher.js"></script>
- <script src="/bg/js/template-renderer-proxy.js"></script>
-
- <script src="/bg/js/settings/keyboard-mouse-input-field.js"></script>
- <script src="/bg/js/settings/modal-jquery.js"></script>
- <script src="/bg/js/settings/profile-conditions-ui.js"></script>
-
- <script src="/bg/js/settings/anki-controller.js"></script>
- <script src="/bg/js/settings/anki-templates-controller.js"></script>
- <script src="/bg/js/settings/audio-controller.js"></script>
- <script src="/bg/js/settings/backup-controller.js"></script>
- <script src="/bg/js/settings/permissions-toggle-controller.js"></script>
- <script src="/bg/js/settings/dictionary-controller.js"></script>
- <script src="/bg/js/settings/dictionary-import-controller.js"></script>
- <script src="/bg/js/settings/generic-setting-controller.js"></script>
- <script src="/bg/js/settings/modal-controller.js"></script>
- <script src="/bg/js/settings/popup-preview-controller.js"></script>
- <script src="/bg/js/settings/profile-controller.js"></script>
- <script src="/bg/js/settings/scan-inputs-controller.js"></script>
- <script src="/bg/js/settings/scan-inputs-simple-controller.js"></script>
- <script src="/bg/js/settings/settings-controller.js"></script>
- <script src="/bg/js/settings/storage-controller.js"></script>
-
- <script src="/bg/js/settings/main.js"></script>
- </body>
-</html>
diff --git a/ext/bg/settings2.html b/ext/bg/settings2.html
deleted file mode 100644
index d0ba0b3c..00000000
--- a/ext/bg/settings2.html
+++ /dev/null
@@ -1,3260 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width,initial-scale=1">
- <title>Yomichan Settings</title>
- <link rel="icon" type="image/png" href="/images/icon16.png" sizes="16x16">
- <link rel="icon" type="image/png" href="/images/icon19.png" sizes="19x19">
- <link rel="icon" type="image/png" href="/images/icon32.png" sizes="32x32">
- <link rel="icon" type="image/png" href="/images/icon38.png" sizes="38x38">
- <link rel="icon" type="image/png" href="/images/icon48.png" sizes="48x48">
- <link rel="icon" type="image/png" href="/images/icon64.png" sizes="64x64">
- <link rel="icon" type="image/png" href="/images/icon128.png" sizes="128x128">
- <link rel="stylesheet" type="text/css" href="/css/material.css">
- <link rel="stylesheet" type="text/css" href="/css/settings2.css">
-</head>
-<body>
-
-<!-- Main content -->
-<div class="content-outer"><div class="content">
-<div class="content-left">
- <div class="sidebar"><div class="sidebar-inner">
- <div class="sidebar-body">
- <a href="#!profile" class="outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="profile"></span></span><span class="outline-item-label">Profile</span></a>
- <a href="#!dictionaries" class="outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="book"></span><span class="outline-item-left-warning-badge no-dictionaries-enabled-warning" hidden><div class="warning-badge"><span class="icon" data-icon="exclamation-point-short"></span></div></span></span><span class="outline-item-label">Dictionaries</span></a>
- <a href="#!general" class="outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="cog"></span></span><span class="outline-item-label">General</span></a>
- <a href="#!scanning" class="outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="scanning"></span></span><span class="outline-item-label">Scanning</span></a>
- <a href="#!popup" class="outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="popup"></span></span><span class="outline-item-label">Popup</span></a>
- <a href="#!popup-appearance" class="outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="palette"></span></span><span class="outline-item-label">Appearance</span></a>
- <a href="#!popup-size" class="outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="popup-size"></span></span><span class="outline-item-label">Position &amp; Size</span></a>
- <a href="#!window" class="outline-item advanced-only"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="window"></span></span><span class="outline-item-label">Window</span></a>
- <a href="#!audio" class="outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="speaker"></span></span><span class="outline-item-label">Audio</span></a>
- <a href="#!text-parsing" class="outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="text-parsing"></span></span><span class="outline-item-label">Text Parsing</span></a>
- <a href="#!sentence-parsing" class="outline-item advanced-only"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="sentence-parsing"></span></span><span class="outline-item-label">Sentence Parsing</span></a>
- <a href="#!translation" class="outline-item advanced-only"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="translation"></span></span><span class="outline-item-label">Translation</span></a>
- <a href="#!anki" class="outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="note-card"></span></span><span class="outline-item-label">Anki</span></a>
- <a href="#!clipboard" class="outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="clipboard"></span></span><span class="outline-item-label">Clipboard</span></a>
- <a href="#!shortcuts" class="outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="keyboard"></span></span><span class="outline-item-label">Shortcuts</span></a>
- <a href="#!backup" class="outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="backup"></span></span><span class="outline-item-label">Backup</span></a>
- <a href="#!security" class="outline-item advanced-only"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="lock"></span></span><span class="outline-item-label">Security</span></a>
- </div>
- <div class="sidebar-bottom">
- <label class="outline-item"><span class="outline-item-left">
- <label class="toggle"><input id="advanced-checkbox" type="checkbox" data-setting="general.showAdvanced"
- data-transform='{
- "type": "setAttribute",
- "selector": ":root",
- "attribute": "data-advanced"
- }'
- ><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>
- </div>
- </div></div>
-</div>
-<div class="content-center">
-
- <span tabindex="-1" id="content-scroll-focus"></span>
-
- <h1>Yomichan Settings</h1>
-
- <!-- Beta notice -->
- <h2></h2>
- <div class="settings-group" style="border: 1px solid var(--accent-color);">
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <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>
- 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>
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Use this new settings page by default</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="global.useSettingsV2" data-scope="global"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- </div>
-
- <!-- Profile -->
- <div class="heading-container">
- <div class="heading-container-icon"><span class="icon" data-icon="profile"></span></div>
- <div class="heading-container-left"><h2 id="profile"><a href="#!profile">Profile</a></h2></div>
- </div>
- <div class="settings-group">
- <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Default profile</div>
- <div class="settings-item-description">Switch the primary profile that is used for scanning.</div>
- </div>
- <div class="settings-item-right">
- <select id="profile-active-select"></select>
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Editing profile</div>
- <div class="settings-item-description">Change which profile is being modified on this page.</div>
- </div>
- <div class="settings-item-right">
- <select id="profile-target-select"></select>
- </div>
- </div></div>
- <div class="settings-item settings-item-button" data-modal-action="show,profiles"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Configure profiles&hellip;</div>
- </div>
- <div class="settings-item-right open-panel-button-container">
- <button class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
- </div>
- </div></div>
- </div>
-
- <!-- Dictionaries -->
- <div class="heading-container">
- <div class="heading-container-icon"><span class="icon" data-icon="book"></span></div>
- <div class="heading-container-left"><h2 id="dictionaries"><a href="#!dictionaries">Dictionaries</a> <span class="heading-sub-text no-wrap" data-modal-action="show,dictionaries">(<span id="dictionary-install-count">#</span> installed, <span id="dictionary-enabled-count">#</span> enabled)</span></h2></div>
- </div>
- <div class="settings-group">
- <div class="settings-item settings-item-button" data-modal-action="show,dictionaries"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">
- <div class="flex-row-nowrap">
- <div>Configure installed and enabled dictionaries&hellip;</div>
- <div class="flex-margin-left warning-badge no-dictionaries-enabled-warning" hidden><span class="icon" data-icon="exclamation-point-short"></span></div>
- </div>
- </div>
- </div>
- <div class="settings-item-right open-panel-button-container">
- <button class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
- </div>
- </div></div>
- <div class="settings-item">
- <div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Storage</div>
- <div class="settings-item-description">
- <span class="storage-use-invalid">
- Yomichan is using an indeterminate amount of storage.
- </span>
- <span class="storage-use-finite" hidden>
- Yomichan is using approximately <span class="storage-usage">?</span> of <span class="storage-quota">?</span>.
- </span>
- <span class="storage-use-infinite" hidden>
- Yomichan is permitted unlimited storage.
- </span>
- </div>
- </div>
- <div class="settings-item-right">
- <button id="storage-refresh" class="low-emphasis">Refresh</button>
- </div>
- </div>
- </div>
- <div class="settings-item">
- <div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Persistent storage</div>
- <div class="settings-item-description">
- Enable to help prevent the browser from unexpectedly clearing the database.
- <a class="more-toggle more-only" data-parent-distance="4">More&hellip;</a>
- </div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" id="storage-persistent-checkbox"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div>
- <div class="settings-item-children more" hidden>
- <p>
- Web browsers will sometimes clear stored data if the device is running low on storage space.
- This can result in the imported dictionaries being deleted unexpectedly, causing Yomichan to stop functioning.
- Enabling persistent storage tells the browser that the data should not be deleted in those circumstances.
- </p>
- <p data-show-for-browser="firefox firefox-mobile" class="storage-use-invalid" hidden>
- On Firefox and Firefox for Android, the storage information feature may be hidden behind a browser flag.
-
- To enable this flag, open <a href="about:config" target="_blank" rel="noopener">about:config</a> and search for
- <strong>dom.storageManager.enabled</strong>.
-
- Setting its value to <strong>true</strong> should allow storage information to be calculated.
- </p>
- <p data-show-for-browser="firefox-mobile">
- It may not be possible to enable Persistent Storage on Firefox for Android.
- </p>
- <p data-show-for-browser="chrome edge">
- Chromium-based browsers should not need to enable this setting since the Yomichan extension has
- the <code>unlimitedStorage</code> permission, which should prevent data deletion.<sup><a href="https://bugs.chromium.org/p/chromium/issues/detail?id=680392#c15" target="_blank" rel="noopener">[1]</a></sup>
- </p>
- <p>
- <a class="more-toggle" data-parent-distance="3">Less&hellip;</a>
- </p>
- </div>
- </div>
- </div>
-
- <!-- General -->
- <div class="heading-container">
- <div class="heading-container-icon"><span class="icon" data-icon="cog"></span></div>
- <div class="heading-container-left"><h2 id="general"><a href="#!general">General</a></h2></div>
- </div>
- <div class="settings-group">
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Enable content scanning</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="general.enable"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </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>
- <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>
- </div>
- </div></div>
- <div class="settings-item">
- <div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Result grouping mode</div>
- <div class="settings-item-description">
- Change how related results are grouped.
- <a class="more-toggle more-only" data-parent-distance="4">More...</a>
- </div>
- </div>
- <div class="settings-item-right">
- <select data-setting="general.resultOutputMode"
- data-transform='{
- "type": "setVisibility",
- "selector": "#main-dictionary-container",
- "condition": {"op": "===", "value": "merge"}
- }'
- >
- <option value="split">No grouping</option>
- <option value="group">Group term-reading pairs</option>
- <option value="merge">Group related terms</option>
- </select>
- </div>
- </div>
- <div class="settings-item-children more" hidden>
- <ul>
- <li>
- <strong>No grouping</strong> -
- Every definition will be listed as a separate entry.
- </li>
- <li>
- <strong>Group term-reading pairs</strong> -
- Definitions for the same term with the same reading will be grouped together.
- </li>
- <li>
- <p>
- <strong>Group related terms</strong> -
- Related terms that share the same definitions will be grouped together.
- </p>
- <p>
- The <em>Primary dictionary</em> option should be assigned to a dictionary which contains related term information,
- and configuring the <em>Secondary dictionaries</em> will allow definitions for the related terms to be
- included from other dictionaries.
- </p>
- <p class="warning-text">
- Not all dictionaries are able to be selected as the <em>Primary dictionary</em>.
- </p>
- </li>
- </ul>
- <p>
- <a class="more-toggle" data-parent-distance="3">Less&hellip;</a>
- </p>
- </div>
- <div class="settings-item-children settings-item-children-group" id="main-dictionary-container" hidden>
- <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Primary dictionary</div>
- </div>
- <div class="settings-item-right">
- <select data-setting="general.mainDictionary"></select>
- </div>
- </div></div>
- <div class="settings-item settings-item-button" data-modal-action="show,secondary-search-dictionaries"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Secondary dictionaries&hellip;</div>
- </div>
- <div class="settings-item-right open-panel-button-container">
- <button class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
- </div>
- </div></div>
- </div>
- </div>
- <div class="settings-item advanced-only"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Maximum number of results</div>
- <div class="settings-item-description">Adjust the maximum number of results shown for lookups.</div>
- </div>
- <div class="settings-item-right">
- <input type="number" min="1" data-setting="general.maxResults">
- </div>
- </div></div>
- </div>
-
- <!-- Scanning -->
- <div class="heading-container">
- <div class="heading-container-icon"><span class="icon" data-icon="scanning"></span></div>
- <div class="heading-container-left"><h2 id="scanning"><a href="#!scanning">Scanning</a></h2></div>
- </div>
- <div class="settings-group">
- <div class="settings-item">
- <div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Scan modifier key</div>
- <div class="settings-item-description">
- Hold a key while moving the cursor to scan text.
- <a class="more-toggle more-only" data-parent-distance="4">More&hellip;</a>
- </div>
- </div>
- <div class="settings-item-right">
- <select id="main-scan-modifier-key"></select>
- </div>
- </div>
- <div class="settings-item-children more" hidden>
- <p>
- A keyboard modifier key can be used to activate text scanning when the cursor is moved.
- Alternatively, the <em>No key</em> option can be used to scan text whenever the cursor is moved,
- without requiring any key to be held.
- </p>
- <p>
- More advanced scanning input customization can be set up by enabling the <em>Advanced</em> option
- and clicking <em data-modal-action="show,scanning-inputs">Configure advanced scanning inputs</em>.
- </p>
- <p>
- <a class="more-toggle" data-parent-distance="3">Less&hellip;</a>
- </p>
- </div>
- </div>
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Scan using middle mouse button</div>
- <div class="settings-item-description">Hold the middle mouse button while moving the cursor to scan text.</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" id="middle-mouse-button-scan"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- <div class="settings-item settings-item-button advanced-only" data-modal-action="show,scanning-inputs"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Configure advanced scanning inputs&hellip; <span class="light no-wrap">(<span class="scanning-input-count">#</span> defined)</span></div>
- </div>
- <div class="settings-item-right open-panel-button-container">
- <button class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
- </div>
- </div></div>
- <div class="settings-item">
- <div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Auto-hide search popup</div>
- <div class="settings-item-description">When no definitions are found after scanning text, the popup will automatically hide.</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="scanning.autoHideResults"
- data-transform='{
- "type": "setVisibility",
- "selector": "#auto-hide-search-popup-options",
- "condition": {"op": "===", "value": true}
- }'
- ><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div>
- <div class="settings-item-children settings-item-children-group" id="auto-hide-search-popup-options" hidden>
- <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Auto-hide delay <span class="light">(in milliseconds)</span></div>
- </div>
- <div class="settings-item-right">
- <input type="number" data-setting="scanning.hideDelay" min="0">
- </div>
- </div></div>
- </div>
- </div>
- <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Scan delay <span class="light">(in milliseconds)</span></div>
- <div class="settings-item-description">Change the delay before scanning occurs when no modifier key is required.</div>
- </div>
- <div class="settings-item-right">
- <input type="number" data-setting="scanning.delay" min="0">
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Select matched text</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="scanning.selectText"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Search text with non-Japanese characters</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="scanning.alphanumeric"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- <div class="settings-item advanced-only"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Layout-aware scanning</div>
- <div class="settings-item-description">Use webpage styling information to determine where line breaks are likely to be.</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="scanning.layoutAwareScan"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- <div class="settings-item advanced-only"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Deep content scanning</div>
- <div class="settings-item-description">Enable scanning text that is covered by other layers.</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="scanning.deepDomScan"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- <div class="settings-item advanced-only"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Text scan length</div>
- <div class="settings-item-description">Change how many characters are read when scanning for terms.</div>
- </div>
- <div class="settings-item-right">
- <input type="number" data-setting="scanning.length" min="1" step="1">
- </div>
- </div></div>
- <div class="settings-item advanced-only">
- <div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">
- Support inputs for devices with touch screens
- <a class="more-toggle more-only" data-parent-distance="4">(?)</a>
- </div>
- </div>
- <div class="settings-item-right flex-row-wrap">
- <div class="settings-item-group settings-item-group-wrap">
- <label class="settings-item-group-item flex-label no-wrap">
- <label class="checkbox"><input type="checkbox" data-setting="scanning.touchInputEnabled"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span>Touch inputs</span>
- </label>
- <label class="settings-item-group-item flex-label no-wrap">
- <label class="checkbox"><input type="checkbox" data-setting="scanning.pointerEventsEnabled"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span>Pointer inputs</span>
- </label>
- </div>
- </div>
- </div>
- <div class="settings-item-children more" hidden>
- <p>
- To enable text scanning when using devices with a touch screen, either the <em>Touch inputs</em> or the <em>Pointer inputs</em> option must be enabled.
- <em>Touch inputs</em> supports generic touches on a touch screen device, but do not distinguish between touch and pen inputs.
- <em>Pointer inputs</em> supports supports the detection pen devices, but may not work on all devices.
- If both options are enabled, <em>Pointer inputs</em> takes precedence.
- </p>
- <p>
- The <em>Pointer inputs</em> option is only visible when the <em>Advanced</em> option is enabled.
- </p>
- <p>
- <a class="more-toggle" data-parent-distance="3">Less&hellip;</a>
- </p>
- </div>
- </div>
- <div class="settings-item settings-item-button advanced-only" data-modal-action="show,input-action-prevention"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Configure input action prevention&hellip;</div>
- </div>
- <div class="settings-item-right open-panel-button-container">
- <button class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
- </div>
- </div></div>
- </div>
-
- <!-- Popup -->
- <div class="heading-container">
- <div class="heading-container-icon"><span class="icon" data-icon="popup"></span></div>
- <div class="heading-container-left"><h2 id="popup"><a href="#!popup">Popup</a></h2></div>
- </div>
- <div class="settings-group">
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Allow scanning search page content</div>
- <div class="settings-item-description">Text on the search page can be scanned for definitions, which will open a popup.</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="scanning.enableOnSearchPage"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- <div class="settings-item">
- <div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Allow scanning popup content</div>
- <div class="settings-item-description">Text inside of popups can be scanned for definitions, which will open a new popup.</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" id="nested-popups-enabled"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div>
- <div class="settings-item-children settings-item-children-group" id="nested-popups-enabled-more-options" hidden>
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Maximum number of child popups</div>
- <div class="settings-item-description">Change the limit on the number of popups that may be generated.</div>
- </div>
- <div class="settings-item-right">
- <input type="number" min="0" step="1" id="nested-popups-count">
- </div>
- </div></div>
- <div class="settings-item advanced-only"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Allow scanning popup source terms</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="scanning.enableOnPopupExpressions"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- </div>
- </div>
- <div class="settings-item advanced-only"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Search terms when clicking text from the results list</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="scanning.enablePopupSearch"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- <div class="settings-item advanced-only">
- <div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">
- Show iframe popups in the root frame
- <a class="more-toggle more-only" data-parent-distance="4">(?)</a>
- </div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="general.showIframePopupsInRootFrame"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div>
- <div class="settings-item-children more" hidden>
- <p>
- By default, scanning text inside of an embeded <code>&lt;iframe&gt;</code> element will open
- a new popup inside of that frame, which can sometimes be limiting due to the frame's size.
- When this option is enabled, the popup will be created in the root of the page, if possible.
- </p>
- <p>
- Note that when this option is enabled, there is a possibility that the extension can interfere with the underlying webpage,
- since it must send messages to the webpage in order to determine the correct position of the popup.
- This typically does not cause issues, but if anything unexpected happens, this option could be the cause.
- </p>
- <p>
- <a class="more-toggle" data-parent-distance="3">Less&hellip;</a>
- </p>
- </div>
- </div>
- </div>
-
- <!-- Popup Appearance -->
- <div class="heading-container">
- <div class="heading-container-icon"><span class="icon" data-icon="palette"></span></div>
- <div class="heading-container-left"><h2 id="popup-appearance"><a href="#!popup-appearance">Popup Appearance</a></h2></div>
- </div>
- <div class="settings-group">
- <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Theme</div>
- <div class="settings-item-description">Adjust the style of the popup.</div>
- </div>
- <div class="settings-item-right">
- <div class="settings-item-group">
- <div class="settings-item-group-item">
- <div class="settings-item-group-item-label">Body</div>
- <select data-setting="general.popupTheme" class="short-width short-height">
- <option value="default">Light</option>
- <option value="dark">Dark</option>
- </select>
- </div>
- <div class="settings-item-group-item">
- <div class="settings-item-group-item-label">Shadow</div>
- <select data-setting="general.popupOuterTheme" class="short-width short-height">
- <option value="auto">Auto</option>
- <option value="default">Light</option>
- <option value="dark">Dark</option>
- </select>
- </div>
- </div>
- </div>
- </div></div>
- <div class="settings-item">
- <div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Action bar appearance</div>
- <div class="settings-item-description">Control when and where the action bar is visible.</div>
- </div>
- <div class="settings-item-right">
- <div class="settings-item-group">
- <div class="settings-item-group-item">
- <div class="settings-item-group-item-label">Visibility</div>
- <select data-setting="general.popupActionBarVisibility" class="short-width short-height">
- <option value="auto">Auto</option>
- <option value="always">Always</option>
- </select>
- </div>
- <div class="settings-item-group-item">
- <div class="settings-item-group-item-label">Location</div>
- <select data-setting="general.popupActionBarLocation" class="short-width short-height">
- <option value="left">Left</option>
- <option value="right">Right</option>
- <option value="top">Top</option>
- <option value="bottom">Bottom</option>
- </select>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Compact glossaries</div>
- <div class="settings-item-description">Display term glossaries using a more compact layout.</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="general.glossaryLayoutMode"
- data-transform='[
- {
- "step": "pre",
- "type": "conditionalConvert",
- "cases": [
- {"op": "===", "value": false, "result": "default"},
- {"op": "===", "value": true, "result": "compact"},
- {"default": true, "result": "default"}
- ]
- },
- {
- "step": "post",
- "type": "conditionalConvert",
- "cases": [
- {"op": "===", "value": "default", "result": false},
- {"op": "===", "value": "compact", "result": true},
- {"default": true, "result": false}
- ]
- }
- ]'
- ><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Compact tags</div>
- <div class="settings-item-description">Show fewer repeated tags for term glossaries.</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="general.compactTags"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- <div class="settings-item advanced-only"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Show tags for expressions and their readings</div>
- <div class="settings-item-description">These tags can be scanned if the options for popup content scanning are enabled.</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="scanning.enableSearchTags"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- <div class="settings-item advanced-only"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Show debug information</div>
- <div class="settings-item-description">A link to log debugging information will be shown in the search results.</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="general.debugInfo"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- <div class="settings-item advanced-only">
- <div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Selection indicator style</div>
- <div class="settings-item-description">Change how the selected definition entry is visually indicated.</div>
- </div>
- <div class="settings-item-right">
- <select data-setting="general.popupCurrentIndicatorMode">
- <option value="none">None</option>
- <option value="asterisk">Asterisk</option>
- <option value="triangle">Triangle</option>
- <option value="bar-left">Vertical bar (left)</option>
- <option value="bar-right">Vertical bar (right)</option>
- <option value="dot-left">Small dot (left)</option>
- <option value="dot-right">Small dot (right)</option>
- </select>
- </div>
- </div>
- </div>
- <div class="settings-item advanced-only">
- <div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">
- Pitch accent display styles
- <a class="more-toggle more-only" data-parent-distance="4">(?)</a>
- </div>
- </div>
- <div class="settings-item-right flex-row-wrap">
- <div class="settings-item-group settings-item-group-wrap">
- <label class="settings-item-group-item flex-label no-wrap">
- <label class="checkbox"><input type="checkbox" data-setting="general.showPitchAccentDownstepNotation"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span>Downstep notation</span>
- </label>
- <label class="settings-item-group-item flex-label no-wrap">
- <label class="checkbox"><input type="checkbox" data-setting="general.showPitchAccentPositionNotation"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span>Downstep position</span>
- </label>
- <label class="settings-item-group-item flex-label no-wrap">
- <label class="checkbox"><input type="checkbox" data-setting="general.showPitchAccentGraph"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span>Graph</span>
- </label>
- </div>
- </div>
- </div>
- <div class="settings-item-children more" hidden>
- <p>
- 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>
- <p>
- <a class="more-toggle" data-parent-distance="3">Less&hellip;</a>
- </p>
- </div>
- </div>
- <div class="settings-item settings-item-button" data-modal-action="show,custom-css"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Configure custom CSS&hellip;</div>
- </div>
- <div class="settings-item-right open-panel-button-container">
- <button class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
- </div>
- </div></div>
- </div>
-
- <!-- Popup Position & Size -->
- <div class="heading-container">
- <div class="heading-container-icon"><span class="icon" data-icon="popup-size"></span></div>
- <div class="heading-container-left"><h2 id="popup-size"><a href="#!popup-size">Popup Position &amp; Size</a></h2></div>
- </div>
- <div class="settings-group">
- <div class="settings-item">
- <div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Display mode</div>
- <div class="settings-item-description">
- Change the layout of the popup.
- <a class="more-toggle more-only" data-parent-distance="4">More&hellip;</a>
- </div>
- </div>
- <div class="settings-item-right">
- <select data-setting="general.popupDisplayMode">
- <option value="default">Default</option>
- <option value="full-width">Full width</option>
- </select>
- </div>
- </div>
- <div class="settings-item-children more" hidden>
- <p>
- The <em>Default</em> mode will position the popup relative to the scanned text.
- The <em>Full Width</em> mode will anchor the popup to the top or bottom of the screen and take up
- the full width of the screen, which can be useful on devices with touch screens.
- </p>
- <p>
- <a class="more-toggle" data-parent-distance="3">Less&hellip;</a>
- </p>
- </div>
- </div>
- <div class="settings-item">
- <div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Scale</div>
- <div class="settings-item-description">Control the scaling factor of the popup.</div>
- </div>
- <div class="settings-item-right">
- <select data-setting="general.popupScalingFactor"
- data-transform='[
- {"type": "toNumber", "step": "pre", "constraints": {"min": 0.25}},
- {"type": "toString", "step": "post"}
- ]'
- >
- <option value="0.25">25%</option>
- <option value="0.33">33%</option>
- <option value="0.5">50%</option>
- <option value="0.67">67%</option>
- <option value="0.75">75%</option>
- <option value="0.8">80%</option>
- <option value="0.9">90%</option>
- <option value="1">100%</option>
- <option value="1.1">110%</option>
- <option value="1.25">125%</option>
- <option value="1.5">150%</option>
- <option value="1.75">175%</option>
- <option value="2">200%</option>
- <option value="2.5">250%</option>
- <option value="3">300%</option>
- <option value="4">400%</option>
- <option value="5">500%</option>
- </select>
- </div>
- </div>
- <div class="settings-item-children settings-item-children-group advanced-only">
- <div class="settings-item">
- <div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">
- Auto-scale
- <a class="more-toggle more-only" data-parent-distance="4">(?)</a>
- </div>
- </div>
- <div class="settings-item-right flex-row-wrap">
- <div class="settings-item-group settings-item-group-wrap">
- <label class="settings-item-group-item flex-label no-wrap">
- <label class="checkbox"><input type="checkbox" data-setting="general.popupScaleRelativeToPageZoom"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span>Zoom level</span>
- </label>
- <label class="settings-item-group-item flex-label no-wrap">
- <label class="checkbox"><input type="checkbox" data-setting="general.popupScaleRelativeToVisualViewport"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span>Viewport</span>
- </label>
- </div>
- </div>
- </div>
- <div class="settings-item-children more" hidden>
- <p>
- Auto-scaling will scale the popup automatically based on the browser's zoom levels
- in order to keep the popup at a constant physical size, regardless of the zoom level.
- <em>Zoom level</em> uses the zoom level that is typically used on desktop browsers,
- and <em>Viewport</em> uses the zoom level that is typically used on mobile browsers.
- </p>
- <p>
- <a class="more-toggle" data-parent-distance="3">Less&hellip;</a>
- </p>
- </div>
- </div>
- </div>
- </div>
- <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Size</div>
- <div class="settings-item-description">Control the size of the popup, in pixels.</div>
- </div>
- <div class="settings-item-right">
- <div class="settings-item-group">
- <div class="settings-item-group-item">
- <div class="settings-item-group-item-label">Width</div>
- <input type="number" class="short-width short-height" min="1" data-setting="general.popupWidth">
- </div>
- <div class="settings-item-group-item">
- <div class="settings-item-group-item-label">Height</div>
- <input type="number" class="short-width short-height" min="1" data-setting="general.popupHeight">
- </div>
- </div>
- </div>
- </div></div>
- <div class="settings-item advanced-only"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Horizontal text positioning</div>
- <div class="settings-item-description">Change where the popup is positioned relative to horizontal text.</div>
- </div>
- <div class="settings-item-right">
- <select data-setting="general.popupHorizontalTextPosition">
- <option value="below">Below text</option>
- <option value="above">Above text</option>
- </select>
- </div>
- </div></div>
- <div class="settings-item advanced-only"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Vertical text positioning</div>
- <div class="settings-item-description">Change where the popup is positioned relative to vertical text.</div>
- </div>
- <div class="settings-item-right">
- <select data-setting="general.popupVerticalTextPosition">
- <option value="default">Same as horizontal text</option>
- <option value="before">Before reading direction</option>
- <option value="after">After reading direction</option>
- <option value="left">Left of text</option>
- <option value="right">Right of text</option>
- </select>
- </div>
- </div></div>
- <div class="settings-item advanced-only"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Horizontal text offset</div>
- <div class="settings-item-description">Change the distance the popup is placed relative to horizontal text.</div>
- </div>
- <div class="settings-item-right">
- <div class="settings-item-group">
- <div class="settings-item-group-item">
- <div class="settings-item-group-item-label">x</div>
- <input type="number" class="short-width short-height" data-setting="general.popupHorizontalOffset">
- </div>
- <div class="settings-item-group-item">
- <div class="settings-item-group-item-label">y</div>
- <input type="number" class="short-width short-height" data-setting="general.popupVerticalOffset">
- </div>
- </div>
- </div>
- </div></div>
- <div class="settings-item advanced-only"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Vertical text offset</div>
- <div class="settings-item-description">Change the distance the popup is placed relative to vertical text.</div>
- </div>
- <div class="settings-item-right">
- <div class="settings-item-group">
- <div class="settings-item-group-item">
- <div class="settings-item-group-item-label">x</div>
- <input type="number" class="short-width short-height" data-setting="general.popupHorizontalOffset2">
- </div>
- <div class="settings-item-group-item">
- <div class="settings-item-group-item-label">y</div>
- <input type="number" class="short-width short-height" data-setting="general.popupVerticalOffset2">
- </div>
- </div>
- </div>
- </div></div>
- </div>
-
- <!-- Window -->
- <div class="heading-container advanced-only">
- <div class="heading-container-icon"><span class="icon" data-icon="window"></span></div>
- <div class="heading-container-left"><h2 id="window"><a href="#!window">Window</a></h2></div>
- <div class="heading-container-right"><a class="heading-link-light" id="test-window-open-link">Open&hellip;</a></div>
- </div>
- <div class="settings-group advanced-only">
- <div class="settings-item">
- <div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">
- Use a native browser window instead of an embedded popup
- <a class="more-toggle more-only" data-parent-distance="4">(?)</a>
- </div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="general.usePopupWindow"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div>
- <div class="settings-item-children more" hidden>
- <p>
- Instead of showing definitions in a popup embedded into the webpage,
- a native browser window containing the popup content will be opened instead.
- This window will be shared across all tabs.
- </p>
- <p>
- <a class="more-toggle" data-parent-distance="3">Less&hellip;</a>
- </p>
- </div>
- </div>
- <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Size</div>
- <div class="settings-item-description">Control the size of the window, in pixels.</div>
- </div>
- <div class="settings-item-right">
- <div class="settings-item-group">
- <div class="settings-item-group-item">
- <div class="settings-item-group-item-label">Width</div>
- <input type="number" class="short-width short-height" min="0" step="1" data-setting="popupWindow.width">
- </div>
- <div class="settings-item-group-item">
- <div class="settings-item-group-item-label">Height</div>
- <input type="number" class="short-width short-height" min="0" step="1" data-setting="popupWindow.height">
- </div>
- </div>
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Left position</div>
- <div class="settings-item-description">Control the left position of the window, in pixels.</div>
- </div>
- <div class="settings-item-right">
- <div class="settings-item-group">
- <div class="settings-item-group-item" id="popup-window-left-container" hidden>
- <div class="settings-item-group-item-label">x</div>
- <input type="number" class="short-width short-height" step="1" data-setting="popupWindow.left">
- </div>
- <div class="settings-item-group-item">
- <div class="settings-item-group-item-label">Mode</div>
- <select class="short-width short-height" data-setting="popupWindow.useLeft"
- data-transform='[
- {
- "step": "pre",
- "type": "toBoolean"
- },
- {
- "type": "setVisibility",
- "selector": "#popup-window-left-container",
- "condition": {"op": "===", "value": true}
- },
- {
- "step": "post",
- "type": "toString"
- }
- ]'
- >
- <option value="false">Auto</option>
- <option value="true">Manual</option>
- </select>
- </div>
- </div>
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Top position</div>
- <div class="settings-item-description">Control the top position of the window, in pixels.</div>
- </div>
- <div class="settings-item-right">
- <div class="settings-item-group">
- <div class="settings-item-group-item" id="popup-window-top-container" hidden>
- <div class="settings-item-group-item-label">y</div>
- <input type="number" class="short-width short-height" step="1" data-setting="popupWindow.top">
- </div>
- <div class="settings-item-group-item">
- <div class="settings-item-group-item-label">Mode</div>
- <select class="short-width short-height" data-setting="popupWindow.useTop"
- data-transform='[
- {
- "step": "pre",
- "type": "toBoolean"
- },
- {
- "type": "setVisibility",
- "selector": "#popup-window-top-container",
- "condition": {"op": "===", "value": true}
- },
- {
- "step": "post",
- "type": "toString"
- }
- ]'
- >
- <option value="false">Auto</option>
- <option value="true">Manual</option>
- </select>
- </div>
- </div>
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Window style</div>
- <div class="settings-item-description">Change the appearance of the window.</div>
- </div>
- <div class="settings-item-right">
- <div class="settings-item-group">
- <div class="settings-item-group-item">
- <div class="settings-item-group-item-label">Type</div>
- <select class="short-width short-height" data-setting="popupWindow.windowType">
- <option value="normal">Normal</option>
- <option value="popup">Popup</option>
- </select>
- </div>
- <div class="settings-item-group-item">
- <div class="settings-item-group-item-label">State</div>
- <select class="short-width short-height" data-setting="popupWindow.windowState">
- <option value="normal">Normal</option>
- <option value="maximized">Maximized</option>
- <option value="fullscreen">Fullscreen</option>
- </select>
- </div>
- </div>
- </div>
- </div></div>
- </div>
-
- <!-- Audio -->
- <div class="heading-container">
- <div class="heading-container-icon"><span class="icon" data-icon="speaker"></span></div>
- <div class="heading-container-left"><h2 id="audio"><a href="#!audio">Audio</a></h2></div>
- </div>
- <div class="settings-group">
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Enable audio playback for terms</div>
- <div class="settings-item-description">Show a clickable speaker icon next to search results.</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="audio.enabled"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Auto-play search result audio</div>
- <div class="settings-item-description">The audio for the first result will be played automatically.</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="audio.autoPlay"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Audio volume</div>
- <div class="settings-item-description">Adjust the volume audio is played at, in percent.</div>
- </div>
- <div class="settings-item-right">
- <input type="number" data-setting="audio.volume" min="0" max="100">
- </div>
- </div></div>
- <div class="settings-item settings-item-button" data-modal-action="show,audio-sources"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Configure audio playback sources&hellip;</div>
- </div>
- <div class="settings-item-right open-panel-button-container">
- <button class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
- </div>
- </div></div>
- </div>
-
- <!-- Text Parsing -->
- <div>
- <div class="heading-container">
- <div class="heading-container-icon"><span class="icon" data-icon="text-parsing"></span></div>
- <div class="heading-container-left"><h2 id="text-parsing"><a href="#!text-parsing">Text Parsing</a></h2></div>
- <div class="heading-container-right"><a class="more-toggle more-only heading-link-light" data-parent-distance="3">Info&hellip;</a></div>
- </div>
- <div class="heading-description more" hidden>
- <p>
- Yomichan can attempt to parse entire sentences or longer text blocks on the search page,
- adding furigana above words and optional space between words.
- </p>
- <p>
- <a class="more-toggle" data-parent-distance="3">Less&hellip;</a>
- </p>
- </div>
- </div>
- <div class="settings-group">
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Parse text using installed dictionaries</div>
- <div class="settings-item-description">Words are scanned by automatically advancing in the sentence after a matching word.</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="parsing.enableScanningParser"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- <div class="settings-item advanced-only">
- <div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-invalid-indicator"></div>
- <div class="settings-item-label">Parse text using <a href="https://en.wikipedia.org/wiki/MeCab" target="_blank" rel="noopener noreferrer">MeCab</a></div>
- <div class="settings-item-description">
- Requires a native component to be installed that Yomichan will connect to.
- <a class="more-toggle more-only" data-parent-distance="4">More&hellip;</a>
- </div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" class="permissions-toggle" data-permissions-setting="parsing.enableMecabParser" data-required-permissions="nativeMessaging"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div>
- <div class="settings-item-children more" hidden>
- <p>
- MeCab is a third-party program which uses its own dictionaries and parsing algorithm to decompose sentences into individual words.
- In order for Yomichan to use it, both MeCab and a native messaging component must be installed.
- A setup guide can be found <a href="https://github.com/siikamiika/yomichan-mecab-installer/blob/master/README.md" target="_blank" rel="noopener noreferrer">here</a>.
- </p>
- <div class="margin-above flex-row-nowrap">
- <button id="test-mecab-button">Test</button>
- <div id="test-mecab-results" class="flex-margin-left" hidden></div>
- </div>
- <p class="margin-above">
- <a class="more-toggle" data-parent-distance="3">Less&hellip;</a>
- </p>
- </div>
- </div>
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Show space between parsed words</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="parsing.termSpacing"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Reading mode</div>
- <div class="settings-item-description">Change what type of furigana is displayed for parsed text.</div>
- </div>
- <div class="settings-item-right">
- <select data-setting="parsing.readingMode" lang="ja">
- <option value="none">None</option>
- <option value="hiragana">ひらがな</option>
- <option value="katakana">カタカナ</option>
- <option value="romaji">Romaji</option>
- </select>
- </div>
- </div></div>
- </div>
-
- <!-- Text Parsing -->
- <div class="advanced-only">
- <div class="heading-container">
- <div class="heading-container-icon"><span class="icon" data-icon="sentence-parsing"></span></div>
- <div class="heading-container-left"><h2 id="sentence-parsing"><a href="#!sentence-parsing">Sentence Parsing</a></h2></div>
- <div class="heading-container-right"><a class="more-toggle more-only heading-link-light" data-parent-distance="3">Info&hellip;</a></div>
- </div>
- <div class="heading-description more" hidden>
- <p>
- Yomichan can scan and parse sentences which can be used as contextual information for Anki cards.
- </p>
- <p>
- <a class="more-toggle" data-parent-distance="3">Less&hellip;</a>
- </p>
- </div>
- </div>
- <div class="settings-group advanced-only">
- <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Sentence scanning extent</div>
- <div class="settings-item-description">Adjust how many characters are bidirectionally scanned to form a sentence.</div>
- </div>
- <div class="settings-item-right">
- <input type="number" data-setting="sentenceParsing.scanExtent" min="0" step="1">
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Enable sentence termination characters</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="sentenceParsing.enableTerminationCharacters"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- <div class="settings-item settings-item-button" data-modal-action="show,sentence-termination-characters"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Configure sentence termination characters&hellip;</div>
- </div>
- <div class="settings-item-right open-panel-button-container">
- <button class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
- </div>
- </div></div>
- </div>
-
- <!-- Translation -->
- <div class="advanced-only">
- <div class="heading-container">
- <div class="heading-container-icon"><span class="icon" data-icon="translation"></span></div>
- <div class="heading-container-left"><h2 id="translation"><a href="#!translation">Translation</a></h2></div>
- <div class="heading-container-right"><a class="more-toggle more-only heading-link-light" data-parent-distance="3">Info&hellip;</a></div>
- </div>
- <div class="heading-description more" hidden>
- <p>
- The following options are used during the translation process to create alternate versions of the input text to search for.
- This can be helpful when the input text doesn't exactly match the term or expression found in the database.
- </p>
- <p>
- The conversion options below are listed in the order that the conversions are applied to the input text.
- Most of the conversions have three possible values:
- </p>
- <ul>
- <li>
- <strong>Disabled</strong> -
- This conversion will never be applied to the input text.
- </li>
- <li>
- <strong>Enabled</strong> -
- This conversion will always be applied to the input text.
- </li>
- <li>
- <strong>Use both variants</strong> -
- The translator will check the database for two variations: the raw input text and the converted input text.
- When multiple options use variants, the translator will search for combinations of the converted text.
- </li>
- </ul>
- <p>
- <a class="more-toggle" data-parent-distance="3">Less&hellip;</a>
- </p>
- </div>
- </div>
- <div class="settings-group advanced-only">
- <div class="settings-item settings-item-button" data-modal-action="show,translation-text-replacement-patterns"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Configure custom text replacement patterns&hellip;</div>
- </div>
- <div class="settings-item-right open-panel-button-container">
- <button class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Convert half width characters to full width</div>
- <div class="settings-item-description" lang="ja">ヨミチャン&#x3000;&rarr;&#x3000;ヨミチャン</div>
- </div>
- <div class="settings-item-right">
- <select data-setting="translation.convertHalfWidthCharacters">
- <option value="false">Disabled</option>
- <option value="true">Enabled</option>
- <option value="variant">Use both variants</option>
- </select>
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Convert numeric characters to full width</div>
- <div class="settings-item-description" lang="ja">1234&#x3000;&rarr;&#x3000;1234</div>
- </div>
- <div class="settings-item-right">
- <select data-setting="translation.convertNumericCharacters">
- <option value="false">Disabled</option>
- <option value="true">Enabled</option>
- <option value="variant">Use both variants</option>
- </select>
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Convert alphabetic characters to hiragana</div>
- <div class="settings-item-description" lang="ja">yomichan&#x3000;&rarr;&#x3000;よみちゃん</div>
- </div>
- <div class="settings-item-right">
- <select data-setting="translation.convertAlphabeticCharacters">
- <option value="false">Disabled</option>
- <option value="true">Enabled</option>
- <option value="variant">Use both variants</option>
- </select>
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Convert hiragana to katakana</div>
- <div class="settings-item-description" lang="ja">よみちゃん&#x3000;&rarr;&#x3000;ヨミチャン</div>
- </div>
- <div class="settings-item-right">
- <select data-setting="translation.convertHiraganaToKatakana">
- <option value="false">Disabled</option>
- <option value="true">Enabled</option>
- <option value="variant">Use both variants</option>
- </select>
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Convert katakana to hiragana</div>
- <div class="settings-item-description" lang="ja">ヨミチャン&#x3000;&rarr;&#x3000;よみちゃん</div>
- </div>
- <div class="settings-item-right">
- <select data-setting="translation.convertKatakanaToHiragana">
- <option value="false">Disabled</option>
- <option value="true">Enabled</option>
- <option value="variant">Use both variants</option>
- </select>
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Collapse emphatic character sequences</div>
- <div class="settings-item-description" lang="ja">すっっごーーい&#x3000;&rarr;&#x3000;すっごーい / すごい</div>
- </div>
- <div class="settings-item-right">
- <select data-setting="translation.collapseEmphaticSequences">
- <option value="false">Disabled</option>
- <option value="true">Collapse into single character</option>
- <option value="full">Remove all characters</option>
- </select>
- </div>
- </div></div>
- </div>
-
- <!-- Anki -->
- <div>
- <div class="heading-container">
- <div class="heading-container-icon"><span class="icon" data-icon="note-card"></span></div>
- <div class="heading-container-left"><h2 id="anki"><a href="#!anki">Anki</a></h2></div>
- <div class="heading-container-right"><a class="more-toggle more-only heading-link-light" data-parent-distance="3">Info&hellip;</a></div>
- </div>
- <div class="heading-description more" hidden>
- <p>
- Yomichan supports automatic flashcard creation for <a href="https://apps.ankiweb.net/" target="_blank" rel="noopener noreferrer">Anki</a>,
- a free application designed to assist in remembering information.
- This feature requires installation of the <a href="https://foosoft.net/projects/anki-connect/" target="_blank" rel="noopener noreferrer">AnkiConnect</a> plugin.
- </p>
- <p>
- <a class="more-toggle" data-parent-distance="3">Less&hellip;</a>
- </p>
- </div>
- </div>
- <div class="settings-group">
- <div class="settings-item">
- <div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Enable Anki integration</div>
- <div class="settings-item-description">
- <span>Connection status:</span>
- <span id="anki-error-message">&hellip;</span> <a id="anki-error-message-details-toggle" hidden>Details&hellip;</a>
- </div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="anki.enable"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div>
- <div class="settings-item-children" id="anki-error-message-details-container" hidden>
- <p class="danger-text" id="anki-error-invalid-response-info" hidden>
- Attempting to connect to Anki can sometimes return an error message which includes "Invalid response",
- which may indicate that the value of the <em>AnkiConnect server address</em> option is incorrect.
- Resetting it to the default value may fix issues that are occurring.
- </p>
- <div class="danger-text" id="anki-error-message-details"></div>
- </div>
- </div>
- <div class="settings-item">
- <div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">AnkiConnect server address</div>
- <div class="settings-item-description">
- Change the URL of the AnkiConnect server.
- <a class="more-toggle more-only" data-parent-distance="4">More&hellip;</a>
- </div>
- </div>
- <div class="settings-item-right">
- <input type="text" placeholder="http://127.0.0.1:8765" spellcheck="false" autocomplete="off" data-setting="anki.server">
- </div>
- </div>
- <div class="settings-item-children more" hidden>
- <p>
- The default address for a server on the same device is <a href="http://127.0.0.1:8765" target="_blank" rel="noopener noreferrer">http://127.0.0.1:8765</a>.
- If Anki is running and AnkiConnect is installed, clicking this URL should open a page showing the current version of AnkiConnect.
- </p>
- <p>
- <a class="more-toggle" data-parent-distance="3">Less&hellip;</a>
- </p>
- </div>
- </div>
- <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Card tags</div>
- <div class="settings-item-description">List of space or comma separated tags to add to the card.</div>
- </div>
- <div class="settings-item-right">
- <input type="text" spellcheck="false" autocomplete="off" data-setting="anki.tags"
- data-transform='[
- {"type": "splitTags", "step": "pre"},
- {"type": "joinTags", "step": "post"}
- ]'
- >
- </div>
- </div></div>
- <div class="settings-item advanced-only">
- <div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Check for card duplicates</div>
- <div class="settings-item-description">When a card is detected as a duplicate, the add buttons will be disabled.</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="anki.checkForDuplicates"
- data-transform='{
- "type": "setVisibility",
- "selector": "#anki-card-duplicate-options",
- "condition": {"op": "===", "value": true}
- }'
- ><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div>
- <div class="settings-item-children settings-item-children-group" id="anki-card-duplicate-options" hidden>
- <div class="settings-item">
- <div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">
- Duplicate card scope
- <a class="more-toggle more-only" data-parent-distance="4">(?)</a>
- </div>
- </div>
- <div class="settings-item-right">
- <select data-setting="anki.duplicateScope">
- <option value="collection">Collection</option>
- <option value="deck">Deck</option>
- <option value="deck-root">Deck root</option>
- </select>
- </div>
- </div>
- <div class="settings-item-children more" hidden>
- <p>
- A card is considered a duplicate if the value of the first field matches that of any other card.
- By default, this check will include cards across all decks in a collection, but this constraint can be relaxed
- by using either the <em>Deck</em> or <em>Deck root</em> option.
- </p>
- <p>
- The <em>Deck</em> option will only check for duplicates in the target deck.
- The <em>Deck root</em> option will additionally check for duplicates in all child decks of the root deck.
- This allows adding cards that are unique for decks including a subdeck structure.
- For decks which don't have any parent-child hierarchy, both options function the same.
- </p>
- <p>
- <a class="more-toggle" data-parent-distance="3">Less&hellip;</a>
- </p>
- </div>
- </div>
- </div>
- </div>
- <div class="settings-item advanced-only"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Screenshot format</div>
- <div class="settings-item-description">Adjust the format and quality of screenshots created for cards.</div>
- </div>
- <div class="settings-item-right">
- <div class="settings-item-group">
- <div class="settings-item-group-item" id="anki-screenshot-quality" hidden>
- <div class="settings-item-group-item-label">Quality (%)</div>
- <input type="number" class="short-width short-height" data-setting="anki.screenshot.quality" min="0" max="100" step="1">
- </div>
- <div class="settings-item-group-item">
- <div class="settings-item-group-item-label">Format</div>
- <select class="short-width short-height" data-setting="anki.screenshot.format"
- data-transform='{
- "type": "setVisibility",
- "selector": "#anki-screenshot-quality",
- "condition": {"op": "===", "value": "jpeg"}
- }'
- >
- <option value="png">PNG</option>
- <option value="jpeg">JPEG</option>
- </select>
- </div>
- </div>
- </div>
- </div></div>
-
- <div class="settings-item advanced-only"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Suspend new cards</div>
- <div class="settings-item-description">New cards will be suspended when a note is added.</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="anki.suspendNewCards"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- <div class="settings-item settings-item-button" data-modal-action="show,anki-cards"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Configure Anki card format&hellip;</div>
- </div>
- <div class="settings-item-right open-panel-button-container">
- <button class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
- </div>
- </div></div>
- <div class="settings-item settings-item-button advanced-only" data-modal-action="show,anki-card-templates"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Configure Anki card templates&hellip;</div>
- </div>
- <div class="settings-item-right open-panel-button-container">
- <button class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
- </div>
- </div></div>
- </div>
-
- <!-- Clipboard -->
- <div>
- <div class="heading-container">
- <div class="heading-container-icon"><span class="icon" data-icon="clipboard"></span></div>
- <div class="heading-container-left"><h2 id="clipboard"><a href="#!clipboard">Clipboard</a></h2></div>
- <div class="heading-container-right"><a class="more-toggle more-only heading-link-light" data-parent-distance="3">Info&hellip;</a></div>
- </div>
- <div class="heading-description more" hidden>
- <p>
- Yomichan can watch the system copy clipboard for Japanese text and automatically search the
- text on the search page.
- This can be useful for using Yomichan to scan text from external applications.
- </p>
- <p>
- This feature requires Yomichan to have clipboard reading permissions, and when this option is enabled,
- the clipboard will be frequently checked for new text.
- </p>
- <p>
- <a class="more-toggle" data-parent-distance="3">Less&hellip;</a>
- </p>
- </div>
- </div>
- <div class="settings-group">
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-invalid-indicator"></div>
- <div class="settings-item-label">Enable background clipboard text monitoring</div>
- <div class="settings-item-description">Open the search page in a new window when the clipboard contains Japanese text.</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" class="permissions-toggle" data-permissions-setting="clipboard.enableBackgroundMonitor" data-required-permissions="clipboardRead"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-invalid-indicator"></div>
- <div class="settings-item-label">Enable search page clipboard text monitoring</div>
- <div class="settings-item-description">The query on the search page will be automatically updated with text in the clipboard.</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" class="permissions-toggle" data-permissions-setting="clipboard.enableSearchPageMonitor" data-required-permissions="clipboardRead"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Maximum clipboard text search length</div>
- <div class="settings-item-description">Limit the number of characters used when searching clipboard text.</div>
- </div>
- <div class="settings-item-right">
- <input type="number" min="0" step="1" data-setting="clipboard.maximumSearchLength">
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Clipboard text search mode</div>
- <div class="settings-item-description">Change how the search page reacts to new text in the clipboard.</div>
- </div>
- <div class="settings-item-right">
- <select data-setting="clipboard.autoSearchContent"
- data-transform='[
- {
- "step": "pre",
- "type": "toBoolean"
- },
- {
- "step": "post",
- "type": "toString"
- }
- ]'
- >
- <option value="true">Search for definitions</option>
- <option value="false">Update query only</option>
- </select>
- </div>
- </div></div>
- </div>
-
- <!-- Shortcuts -->
- <div class="heading-container">
- <div class="heading-container-icon"><span class="icon" data-icon="keyboard"></span></div>
- <div class="heading-container-left"><h2 id="shortcuts"><a href="#!shortcuts">Shortcuts</a></h2></div>
- </div>
- <div class="settings-group">
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">
- <p>
- Yomichan has two categories of keyboard shortcuts:
- </p>
- <ul>
- <li>
- <strong>Standard</strong> keyboard shortcuts are controlled by the extension, and can be added, removed,
- and configured to work on webpages that Yomichan functions on.
- </li>
- <li>
- <strong>Native</strong> keyboard shortcuts are controlled by the web browser, and function globally
- within the web browser<span data-show-for-browser="chrome edge"> or system-wide</span>.
- </li>
- </ul>
- </div>
- </div>
- </div></div>
- <div class="settings-item settings-item-button" data-modal-action="show,keyboard-shortcuts"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Configure standard keyboard shortcuts&hellip;</div>
- </div>
- <div class="settings-item-right open-panel-button-container">
- <button class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
- </div>
- </div></div>
- <div class="settings-item settings-item-button" data-modal-action="show,extension-keyboard-shortcuts"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Configure native keyboard shortcuts&hellip;</div>
- </div>
- <div class="settings-item-right open-panel-button-container">
- <button class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
- </div>
- </div></div>
- </div>
-
- <!-- Backup -->
- <div class="heading-container">
- <div class="heading-container-icon"><span class="icon" data-icon="backup"></span></div>
- <div class="heading-container-left"><h2 id="backup"><a href="#!backup">Backup</a></h2></div>
- </div>
- <div class="settings-group">
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">
- Yomichan can import and export settings files which can be used to restore settings, share settings across devices, and to help to debug problems.
- These files will only contain settings and will not contain dictionaries.
- Dictionaries must be imported separately.
- </div>
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-right settings-item-button-group-container">
- <div class="settings-item-button-group">
- <div class="settings-item-button-group-item">
- <button class="low-emphasis" id="settings-import-button">Import Settings</button>
- <div hidden><input type="file" id="settings-import-file" accept=".json,application/json"></div>
- </div>
- <div class="settings-item-button-group-item">
- <button class="low-emphasis" id="settings-export-button">Export Settings</button>
- </div>
- <div class="settings-item-button-group-item">
- <button class="low-emphasis danger" id="settings-reset-button">Reset Settings</button>
- </div>
- </div>
- </div>
- </div></div>
- </div>
-
- <!-- Security -->
- <div class="heading-container advanced-only">
- <div class="heading-container-icon"><span class="icon" data-icon="lock"></span></div>
- <div class="heading-container-left"><h2 id="security"><a href="#!security">Security</a></h2></div>
- </div>
- <div class="settings-group advanced-only">
- <div class="settings-item">
- <div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">
- Use a secure container around popups
- <a class="more-toggle more-only" data-parent-distance="4">(?)</a>
- </div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="general.usePopupShadowDom"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div>
- <div class="settings-item-children more" hidden>
- <p>
- On <a href="https://caniuse.com/shadowdomv1" target="_blank" rel="noopener noreferrer">supported browsers</a>,
- a popup's <code>iframe</code> element will be embeded inside of a container with a closed <a href="https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM" target="_blank" rel="noopener noreferrer">shadow DOM</a>.
- This container prevents scripts running on the underlying web page from being able to discover the <code>iframe</code>,
- which helps avoid situations where the web page might try to modify or use the Yomichan popup for an unintended purpose.
- </p>
- <p>
- <a class="more-toggle" data-parent-distance="3">Less&hellip;</a>
- </p>
- </div>
- </div>
- <div class="settings-item">
- <div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">
- Use secure popup frame URL
- <a class="more-toggle more-only" data-parent-distance="4">(?)</a>
- </div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="general.useSecurePopupFrameUrl"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div>
- <div class="settings-item-children more" hidden>
- <p>
- When this option is enabled, the URL of the <code>iframe</code> element will be assigned by
- directly changing the location of the <code>iframe</code>'s internal document, rather than using
- the <code>iframe</code>'s <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-src" target="_blank" rel="noopener noreferrer"><code>src</code></a>
- attribute. This results in the extension URL not being exposed to the underling web page, and thus making it harder
- to detect the presence of Yomichan.
- </p>
- <p>
- <a class="more-toggle" data-parent-distance="3">Less&hellip;</a>
- </p>
- </div>
- </div>
- </div>
-
- <div class="footer-padding"></div>
-
-</div>
-<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>
- </div>
- </div></div>
-</div>
-</div></div>
-
-
-<!-- Auxiliary content -->
-<div class="content-dimmer"></div>
-
-<div class="fab-container">
- <div class="fab-container-left"></div>
- <div class="fab-container-center"></div>
- <div class="fab-container-right">
- <div class="fab-container-right-inner1"><div class="fab-container-right-inner2">
- <div class="fab-container-item fab-container-item-popup-preview">
- <button class="fab-button icon-button" data-action="toggle-preview-sidebar"><span class="icon-button-inner"><span class="fab-button-background"></span><span class="icon" data-icon="popup"></span></span></button>
- </div>
- <div class="fab-container-item">
- <button class="fab-button icon-button" data-action="toggle-sidebar"><span class="icon-button-inner"><span class="fab-button-background"></span><span class="icon" data-icon="hamburger-menu"></span></span></button>
- </div>
- </div></div>
- </div>
-</div>
-
-<div class="status-footer-container" hidden><div class="status-footer-container2">
- <div class="status-footer">
- <div class="status-footer-header"><div class="status-footer-header-label">Tasks in progress:</div><a class="status-footer-header-close">Close</a></div>
- <div class="status-footer-item dictionary-delete-progress" hidden>
- <div class="progress-labels"><div class="progress-info"></div><div class="progress-status"></div></div>
- <div class="progress-bar-track"><div class="progress-bar danger"></div></div>
- </div>
- <div class="status-footer-item dictionary-import-progress" hidden>
- <div class="progress-labels"><div class="progress-info"></div><div class="progress-status"></div></div>
- <div class="progress-bar-track"><div class="progress-bar"></div></div>
- </div>
- </div>
-</div></div>
-
-<div id="popup-menus"></div>
-
-
-<!-- Profile modals -->
-<div id="profiles-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
- <div class="modal-header">
- <div class="modal-title">Profiles</div>
- <div class="modal-header-button-container">
- <div class="modal-header-button-group">
- <button class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
- <button class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
- </div>
- </div>
- </div>
- <div class="modal-body">
- <div class="profile-entry-header">
- <div class="profile-entry-cell"></div>
- <div class="profile-entry-cell"><span class="profile-entry-header-text">Default</span></div>
- <div class="profile-entry-cell"><span class="profile-entry-header-text">Name</span></div>
- <div class="profile-entry-cell"><span class="profile-entry-header-text">Conditions</span></div>
- <div class="profile-entry-cell"></div>
- </div>
- <div class="profile-entry-list generic-list" id="profile-entry-list"></div>
- <div class="profile-add-button-container">
- <button class="low-emphasis" id="profile-add-button">Add</button>
- </div>
- </div>
- <div class="modal-footer">
- <button data-modal-action="hide">Close</button>
- </div>
-</div></div>
-
-<div id="profile-conditions-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
- <div class="modal-header">
- <div class="modal-title">Profile Conditions</div>
- <div class="modal-header-button-container">
- <div class="modal-header-button-group">
- <button class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
- <button class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
- </div>
- </div>
- </div>
- <div class="modal-body">
- <div class="settings-item">
- <div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">
- Conditions for profile <em id="profile-conditions-profile-name"></em>:
- </div>
- </div>
- <div class="settings-item-right">
- <a class="more-toggle more-only" data-parent-distance="3">Info&hellip;</a>
- </div>
- </div>
- <div class="settings-item-children more" hidden>
- <p>
- Profile usage conditions are used to automatically select certain profiles based on context.
- For example, different profiles can be used depending on the nested level of the popup, or based on the website's URL.
- </p>
- <p>
- Conditions are organized into groups corresponding to the order in which they are checked.
- If all of the conditions in any group of a profile are met, then that profile will be used for that context.
- </p>
- <p>
- If no conditions are specified, the profile will only be used if it is selected as the default profile.
- </p>
- <p>
- <a class="more-toggle" data-parent-distance="3">Hide&hellip;</a>
- </p>
- </div>
- </div>
- <div class="profile-condition-groups" id="profile-condition-groups"></div>
- <div class="profile-condition-group-list-info">
- <div class="profile-condition-groups-empty-info"><em>No conditions set up.</em></div>
- <div class="profile-condition-group-list-info-space"></div>
- <button class="low-emphasis" id="profile-add-condition-group">Add Group</button>
- </div>
- </div>
- <div class="modal-footer">
- <button data-modal-action="hide">Close</button>
- </div>
-</div></div>
-
-<div id="profile-copy-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
- <div class="modal-header">
- <div class="modal-title">Copy Profile</div>
- <div class="modal-header-button-container">
- <div class="modal-header-button-group">
- <button class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
- <button class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
- </div>
- </div>
- </div>
- <div class="modal-body">
- <p>Select which profile to copy options from:</p>
- <select class="form-control" id="profile-copy-source-select"></select>
- </div>
- <div class="modal-footer">
- <button class="low-emphasis" data-modal-action="hide">Cancel</button>
- <button id="profile-copy-confirm-button">Copy Profile</button>
- </div>
-</div></div>
-
-<div id="profile-remove-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
- <div class="modal-header"><div class="modal-title">Confirm Profile Deletion</div></div>
- <div class="modal-body">
- <p>
- Are you sure you want to delete the profile <em id="profile-remove-name"></em>?
- </p>
- </div>
- <div class="modal-footer">
- <button class="low-emphasis" data-modal-action="hide">Cancel</button>
- <button class="danger" id="profile-remove-confirm-button">Remove Profile</button>
- </div>
-</div></div>
-
-
-<!-- Profile templates -->
-<template id="profile-entry-template"><div class="profile-entry generic-list-entry">
- <div class="profile-entry-cell generic-list-index-prefix"></div>
- <div class="profile-entry-cell"><label class="radio"><input type="radio" class="profile-entry-is-default-radio" name="profile-entry-default-radio"><span class="radio-body"><span class="radio-border"></span><span class="radio-dot"></span></span></label></div>
- <div class="profile-entry-cell"><input class="profile-entry-name-input" type="text" autocomplete="off" placeholder="Profile name"></div>
- <div class="profile-entry-cell"><a class="profile-entry-condition-count-link"><span class="profile-entry-condition-count">0</span></a></div>
- <div class="profile-entry-cell input-height-icon-button-container"><button class="icon-button profile-entry-menu-button" data-menu="profile-menu" data-menu-position="below left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button></div>
-</div></template>
-
-<template id="profile-condition-group-template"><div class="profile-condition-group">
- <div class="profile-condition-list"></div>
- <div class="profile-condition-list-info">
- <div class="profile-condition-group-separator-label">or</div>
- <div class="profile-condition-list-info-space"></div>
- <button class="profile-condition-add-button low-emphasis">Add</button>
- </div>
-</div></template>
-
-<template id="profile-condition-template"><div class="profile-condition">
- <div class="profile-condition-prefix"></div>
- <div class="profile-condition-inner">
- <select class="profile-condition-type"><optgroup label="Type"></optgroup></select>
- <select class="profile-condition-operator"><optgroup label="Operator"></optgroup></select>
- <div class="profile-condition-input-container">
- <input type="text" class="profile-condition-input" autocomplete="off" spellcheck="false">
- <div class="input-height-icon-button-container mouse-button-container" hidden>
- <button class="icon-button profile-condition-mouse-button mouse-button"><span class="icon-button-inner"><span class="icon" data-icon="mouse"></span></span></button>
- </div>
- </div>
- </div>
- <div class="profile-condition-menu-button-container input-height-icon-button-container">
- <button class="icon-button profile-condition-menu-button" data-menu="profile-condition-menu" data-menu-position="below left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button>
- </div>
-</div></template>
-
-<template id="profile-menu-template"><div class="popup-menu-container" tabindex="-1" role="dialog"><div class="popup-menu"><div class="popup-menu-body">
- <button class="popup-menu-item" data-menu-action="moveUp">Move up</button>
- <button class="popup-menu-item" data-menu-action="moveDown">Move down</button>
- <button class="popup-menu-item" data-menu-action="copyFrom">Copy from...</button>
- <button class="popup-menu-item" data-menu-action="editConditions">Edit conditions...</button>
- <button class="popup-menu-item" data-menu-action="duplicate">Duplicate</button>
- <button class="popup-menu-item" data-menu-action="delete">Delete</button>
-</div></div></div></template>
-
-<template id="profile-condition-menu-template"><div class="popup-menu-container" tabindex="-1" role="dialog"><div class="popup-menu"><div class="popup-menu-body">
- <button class="popup-menu-item" data-menu-action="resetValue">Reset value</button>
- <button class="popup-menu-item" data-menu-action="delete">Delete</button>
- <button class="popup-menu-item" data-menu-action="deleteGroup">Delete group</button>
-</div></div></div></template>
-
-
-<!-- Dictionary modals -->
-<div id="dictionaries-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
- <div class="modal-header">
- <div class="modal-title">Dictionaries</div>
- <div class="modal-header-button-container">
- <div class="modal-header-button-group">
- <button class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
- <button class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
- </div>
- </div>
- </div>
- <div class="modal-body">
- <div class="settings-item">
- <div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">
- Enable support for prefix wildcard searches
- <a class="more-toggle more-only" data-parent-distance="4">(?)</a>
- </div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="global.database.prefixWildcardsSupported" data-scope="global"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div>
- <div class="settings-item-children more" hidden>
- <p>
- In order for dictionaries to support searches using prefix wildcards on the search page,
- some additional data must be stored in the database.
- Enabling this option will include this extra data for any new dictionaries that are imported.
- </p>
- <p class="warning-text">
- This option will not change any dictionaries that are already imported;
- they must be re-imported for the option to take effect.
- </p>
- <p>
- <a class="more-toggle" data-parent-distance="3">Hide&hellip;</a>
- </p>
- </div>
- </div>
-
- <div class="warning-text margin-above no-dictionaries-installed-warning" hidden>
- No dictionaries have been installed yet.
- Visit the <a href="https://foosoft.net/projects/yomichan/#dictionaries" target="_blank" rel="noopener noreferrer">Yomichan homepage</a>
- for a list free dictionaries or click the <em>Import</em> button below to select a dictionary file to import.
- </div>
- <div id="dictionary-error" class="danger-text margin-above" hidden></div>
- <div id="dictionary-list" class="dictionary-list"></div>
- <div id="dictionary-list-extra" class="dictionary-list"></div>
-
- <div hidden><input type="file" id="dictionary-import-file-input" accept=".zip,application/zip" multiple></div>
- </div>
- <div class="modal-body-addon dictionary-delete-progress" hidden>
- <div class="progress-labels"><div class="progress-info"></div><div class="progress-status"></div></div>
- <div class="progress-bar-track"><div class="progress-bar danger"></div></div>
- </div>
- <div class="modal-body-addon dictionary-import-progress" hidden>
- <div class="progress-labels"><div class="progress-info"></div><div class="progress-status"></div></div>
- <div class="progress-bar-track"><div class="progress-bar"></div></div>
- </div>
- <div class="modal-footer">
- <button class="low-emphasis danger dictionary-database-mutating-input" id="dictionary-delete-all-button">Delete All</button>
- <button class="low-emphasis dictionary-database-mutating-input" id="dictionary-check-integrity">Check Integrity</button>
- <button class="low-emphasis dictionary-database-mutating-input" id="dictionary-import-file-button">Import</button>
- <button data-modal-action="hide">Close</button>
- </div>
-</div></div>
-
-<div id="dictionary-confirm-delete-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
- <div class="modal-header"><div class="modal-title">Confirm Dictionary Deletion</div></div>
- <div class="modal-body">
- <p>Are you sure you want to delete the dictionary:</p>
- <p><strong id="dictionary-confirm-delete-name"></strong>?</p>
- <p class="danger-text">This action cannot be undone.</p>
- </div>
- <div class="modal-footer">
- <button class="low-emphasis" data-modal-action="hide">Cancel</button>
- <button class="danger" data-modal-action="hide" id="dictionary-confirm-delete-button">Delete</button>
- </div>
-</div></div>
-
-<div id="dictionary-confirm-delete-all-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
- <div class="modal-header"><div class="modal-title">Confirm Dictionary Deletion</div></div>
- <div class="modal-body">
- <p>Are you sure you want to delete <strong>all dictionaries</strong>?</p>
- <p class="danger-text">This action cannot be undone.</p>
- </div>
- <div class="modal-footer">
- <button class="low-emphasis" data-modal-action="hide">Cancel</button>
- <button class="danger" data-modal-action="hide" id="dictionary-confirm-delete-all-button">Delete</button>
- </div>
-</div></div>
-
-<div id="secondary-search-dictionaries-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
- <div class="modal-header">
- <div class="modal-title">Secondary Search Dictionaries</div>
- <div class="modal-header-button-container">
- <div class="modal-header-button-group">
- <button class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
- <button class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
- </div>
- </div>
- </div>
- <div class="modal-body">
- <p>
- These dictionaries will be used to search for definitions of the related terms when the grouping mode is
- <em>Group related terms</em>.
- </p>
- <div id="secondary-search-dictionary-list" class="dictionary-list margin-above"></div>
- </div>
- <div class="modal-footer">
- <button data-modal-action="hide">Close</button>
- </div>
-</div></div>
-
-
-<!-- Dictionary templates -->
-<template id="dictionary-template"><div class="settings-item dictionary-item">
- <div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label dictionary-info">
- <label class="toggle"><input type="checkbox" class="dictionary-enabled"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- <span class="dictionary-info-label"><strong class="dictionary-title"></strong> <span class="light dictionary-version"></span></span>
- </div>
- </div>
- <div class="settings-item-right">
- <button class="icon-button dictionary-menu-button" data-menu="dictionary-menu" data-menu-position="below left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button>
- </div>
- </div>
- <div class="settings-item-children">
-
- <div class="settings-item dictionary-outdated-notification" hidden><div class="settings-item-children danger-text">
- This dictionary is outdated and may not support new extension features.
- Re-import the dictionary to enable support for the latest features.
- </div></div>
- <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Priority</div>
- </div>
- <div class="settings-item-right">
- <input type="number" step="1" class="short-height dictionary-priority">
- </div>
- </div></div>
- <div class="dictionary-details" hidden>
- <div class="settings-item">
- <div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">
- Prefix wildcard searches supported
- <a class="more-toggle more-only" data-parent-distance="4">(?)</a>
- </div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" class="dictionary-prefix-wildcard-searches-supported" disabled readonly><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div>
- <div class="settings-item-children more" hidden>
- <p class="warning-text">
- Changing this value requires the dictionary to be re-imported.
- </p>
- <p><a class="more-toggle" data-parent-distance="3">Hide&hellip;</a></p>
- </div>
- </div>
- <div class="settings-item"><div class="settings-item-children">
- <div class="dictionary-details-table"></div>
- <div class="dictionary-counts"></div>
- </div></div>
- </div>
-
- </div>
-</div></template>
-
-<template id="dictionary-details-entry-template"><div class="dictionary-details-entry">
- <span class="dictionary-details-entry-label"></span>
- <span class="dictionary-details-entry-info"></span>
-</div></template>
-
-<template id="dictionary-extra-template"><div class="settings-item">
- <div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label"><strong class="dictionary-title">Unassociated Data</strong> <span class="light dictionary-total-count"></span></div>
- </div>
- </div>
- <div class="settings-item-children">
- <p class="warning-text">
- The database contains extra data which is not associated with any installed dictionary.
- Purging the database can fix this issue.
- </p>
- <div class="dictionary-counts"></div>
- </div>
-</div></template>
-
-<template id="dictionary-menu-template"><div class="popup-menu-container" tabindex="-1" role="dialog"><div class="popup-menu"><div class="popup-menu-body">
- <button class="popup-menu-item" data-menu-action="showDetails">Show details</button>
- <button class="popup-menu-item" data-menu-action="hideDetails" hidden>Hide details</button>
- <button class="popup-menu-item" data-menu-action="delete">Delete</button>
-</div></div></div></template>
-
-<template id="secondary-search-dictionary-template"><div class="settings-item dictionary-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label dictionary-info">
- <label class="toggle"><input type="checkbox" class="dictionary-allow-secondary-searches"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- <span class="dictionary-info-label"><strong class="dictionary-title"></strong> <span class="light dictionary-version"></span></span>
- </div>
- </div>
-</div></div></template>
-
-
-<!-- Custom CSS modal -->
-<div id="custom-css-modal" class="modal modal-left" tabindex="-1" role="dialog" hidden><div class="modal-content-container1">
- <div class="modal-content-container2 modal-content-dimmer"><div class="modal-content">
- <div class="modal-header">
- <div class="modal-title">Custom CSS</div>
- <div class="modal-header-button-container">
- <div class="modal-header-button-group">
- <button class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
- <button class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
- </div>
- </div>
- </div>
- <div class="modal-body custom-popup-css-container">
- <div class="custom-popup-css-header">Popup CSS</div>
- <textarea autocomplete="off" spellcheck="false" id="custom-popup-css" data-setting="general.customPopupCss" data-tab-action="indent,4"></textarea>
- <div class="custom-popup-css-header margin-above">Popup outer CSS</div>
- <textarea autocomplete="off" spellcheck="false" id="custom-popup-outer-css" data-setting="general.customPopupOuterCss" data-tab-action="indent,4"></textarea>
- </div>
- <div class="modal-footer">
- <button data-modal-action="hide">Close</button>
- </div>
- </div></div>
- <div class="modal-content-container1-fade"></div>
-</div></div>
-
-
-<!-- Audio sources modal -->
-<div id="audio-sources-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
- <div class="modal-header">
- <div class="modal-title">Audio Sources</div>
- <div class="modal-header-button-container">
- <div class="modal-header-button-group">
- <button class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
- <button class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
- </div>
- </div>
- </div>
- <div class="modal-body">
- <div class="settings-item">
- <div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">
- Text-to-speech voice
- <a class="more-toggle more-only" data-parent-distance="4">(?)</a>
- </div>
- </div>
- <div class="settings-item-right">
- <select data-setting="audio.textToSpeechVoice" id="text-to-speech-voice"></select>
- </div>
- </div>
- <div class="settings-item-children more" hidden>
- <p>
- Change which voice is used for text-to-speech audio playback.
- </p>
- <div class="horizontal-flex">
- <input type="text" value="よみちゃん" id="text-to-speech-voice-test-text" autocomplete="off" lang="ja">
- <button id="text-to-speech-voice-test">Test</button>
- <a class="more-toggle" data-parent-distance="3">Hide&hellip;</a>
- </div>
- </div>
- </div>
- <div class="settings-item">
- <div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">
- Custom audio source
- <a class="more-toggle more-only" data-parent-distance="4">(?)</a>
- </div>
- </div>
- <div class="settings-item-right">
- <div class="settings-item-group">
- <div class="settings-item-group-item">
- <div class="settings-item-group-item-label">Type</div>
- <select class="short-width short-height" data-setting="audio.customSourceType">
- <option value="audio">Audio</option>
- <option value="json">JSON</option>
- </select>
- </div>
- <div class="settings-item-group-item">
- <div class="settings-item-group-item-label">URL</div>
- <input class="short-height" type="text" spellcheck="false" autocomplete="off" data-setting="audio.customSourceUrl" placeholder="None">
- </div>
- </div>
- </div>
- </div>
- <div class="settings-item-children more" hidden>
- <p>
- The <em>URL</em> property specifies the URL format used for fetching audio clips in <em>Custom</em> mode.
- The replacement tags <code data-select-on-click="">{expression}</code> and <code data-select-on-click="">{reading}</code> can be used to specify which
- expression and reading is being looked up.<br>
- </p>
- <p>
- The <em>Type</em> property specifies how the URL is handled when looking up audio:
- </p>
- <ul>
- <li>
- <strong>Audio</strong> - The link is treated as a direct link to an audio file that the browser can play.
- </li>
- <li>
- <strong>JSON</strong> - The link is interpreted as a link to a JSON file, which is downloaded and parsed for audio URLs.
- The format of the JSON file is specified in <a href="/data/schemas/custom-audio-list-schema.json" target="_blank" rel="noopener noreferrer">this schema file</a>.
- </li>
- </ul>
- <p>
- Example URL: <a data-select-on-click="">http://localhost/audio.mp3?expression={expression}&amp;reading={reading}</a>
- </p>
- <p>
- <a class="more-toggle" data-parent-distance="3">Less&hellip;</a>
- </p>
- </div>
- </div>
- <div class="settings-item">
- <div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">
- Audio sources
- <a class="more-toggle more-only" data-parent-distance="4">(?)</a>
- </div>
- </div>
- <div class="settings-item-right">
- <button id="audio-source-add" class="low-emphasis">Add</button>
- </div>
- </div>
- <div class="settings-item-children more" hidden>
- <p>
- When searching for audio, the sources are checked in order until the first
- valid source is found. This allows for selecting a fallback source if the
- first choice is not available.
- </p>
- <p>
- <a class="more-toggle" data-parent-distance="3">Less&hellip;</a>
- </p>
- </div>
- <div class="settings-item-children">
- <div id="audio-source-list" class="generic-list"></div>
- <div id="audio-source-list-empty">
- No audio sources enabled
- </div>
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <button data-modal-action="hide">Close</button>
- </div>
-</div></div>
-
-
-<!-- Audio templates -->
-<template id="audio-source-template"><div class="audio-source horizontal-flex">
- <div class="generic-list-index-prefix"></div>
- <select class="audio-source-select">
- <option value="jpod101">JapanesePod101</option>
- <option value="jpod101-alternate">JapanesePod101 (Alternate)</option>
- <option value="jisho">Jisho.org</option>
- <option value="text-to-speech">Text-to-speech</option>
- <option value="text-to-speech-reading">Text-to-speech (Kana reading)</option>
- <option value="custom">Custom</option>
- </select>
- <div class="horizontal-flex-fill"></div>
- <button class="icon-button audio-source-menu-button" data-menu="audio-source-menu" data-menu-position="below left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button>
-</div></template>
-
-<template id="audio-source-menu-template"><div class="popup-menu-container" tabindex="-1" role="dialog"><div class="popup-menu"><div class="popup-menu-body">
- <button class="popup-menu-item" data-menu-action="remove">Remove</button>
-</div></div></div></template>
-
-
-<!-- Scanning inputs modal -->
-<div id="scanning-inputs-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
- <div class="modal-header">
- <div class="modal-title">Scanning Inputs</div>
- <div class="modal-header-button-container">
- <div class="modal-header-button-group">
- <button class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
- <button class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
- </div>
- </div>
- </div>
- <div class="modal-body">
- <div>
- <p>
- Scanning inputs are used to define when text scanning should occur.
- <a class="more-toggle more-only" data-parent-distance="2">More&hellip;</a>
- </p>
- <div class="margin-above more" hidden>
- <p>
- Text scanning is performed when a pointer is moved and certain inputs are either pressed or not pressed.
- The <em>Required inputs</em> field is used to define which inputs <em>must</em> be pressed, and
- the <em>Excluded inputs</em> field is used to define which inputs <em>must not</em> be pressed.
- If the <em>Required inputs</em> field is empty, text will be scanned whenever the pointer is moved.
- </p>
- <p>
- The <em>Input types</em> group is used to define which types of pointer input that the
- keyboard and button inputs are applied to.
- Supported pointer types include the mouse cursor, touchscreen touches, and pen devices.
- When using the <em>Pen</em> option, the defined inputs will correspond to buttons on the pen device.
- </p>
- <p>
- Some additional scanning and search options can be configured by clicking the menu button and selecting
- <em>Show advanced options</em>.
- </p>
- <ul>
- <li>To assign keyboard keys, select the input field and press modifier keys on the keyboard.</li>
- <li>To assign mouse or pen buttons, click on the button with the mouse icon using the desired button.</li>
- <li>
- To clear inputs, select the input field and press the <em>Escape</em> button,
- or use the <em>Clear inputs</em> menu option.
- </li>
- </ul>
- <p><a class="more-toggle" data-parent-distance="3">Less&hellip;</a></p>
- </div>
- </div>
- <div class="scan-input-list generic-list margin-above" id="scan-input-list"></div>
- <div class="scan-input-list-empty-info warning-text margin-above">
- No scanning inputs have been defined yet.
- Click the <em>Add</em> button to add a new input.
- </div>
- <div class="flex-row-nowrap right"><button class="low-emphasis" id="scan-input-add">Add</button></div>
- </div>
- <div class="modal-footer">
- <button data-modal-action="hide">Close</button>
- </div>
-</div></div>
-
-
-<!-- Scanning inputs templates -->
-<template id="scan-input-template"><div class="scan-input" data-show-advanced="false">
- <div class="scan-input-grid">
- <div class="scan-input-index-cell generic-list-index-prefix"></div>
- <div class="scan-input-suffix-cell">
- <div class="input-height-icon-button-container">
- <button class="icon-button scanning-input-menu-button" data-menu="scanning-inputs-menu" data-menu-position="below left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button>
- </div>
- </div>
-
- <div class="scan-input-prefix-cell" data-property="include"><span>Required inputs:</span></div>
- <div class="scan-input-content-cell" data-property="include">
- <input type="text" class="input-with-suffix-button scan-input-field" autocomplete="off" spellcheck="false" placeholder="No inputs" data-property="include">
- <button class="input-suffix-button input-suffix-icon-button mouse-button" data-property="include"><span class="icon icon-button-icon-light" data-icon="mouse"></span></button>
- </div>
-
- <div class="scan-input-prefix-cell" data-property="exclude"><span>Excluded inputs:</span></div>
- <div class="scan-input-content-cell" data-property="exclude">
- <input type="text" class="input-with-suffix-button scan-input-field" autocomplete="off" spellcheck="false" placeholder="No inputs" data-property="exclude">
- <button class="input-suffix-button input-suffix-icon-button mouse-button" data-property="exclude"><span class="icon icon-button-icon-light" data-icon="mouse"></span></button>
- </div>
-
- <div class="scan-input-prefix-cell scan-input-options-cell" data-property="types"><span>Input types:</span></div>
- <div class="scan-input-content-cell scan-input-options-cell" data-property="types">
- <label class="scan-input-checkbox-item">
- <label class="checkbox"><input type="checkbox" class="scan-input-settings-checkbox" data-property="types.mouse"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span>Mouse</span>
- </label>
- <label class="scan-input-checkbox-item">
- <label class="checkbox"><input type="checkbox" class="scan-input-settings-checkbox" data-property="types.touch"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span>Touch</span>
- </label>
- <label class="scan-input-checkbox-item">
- <label class="checkbox"><input type="checkbox" class="scan-input-settings-checkbox" data-property="types.pen"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span>Pen</span>
- </label>
- </div>
-
- <div class="scan-input-prefix-cell scan-input-options-cell scan-input-advanced-only" data-property="search-options"><span>Search types:</span></div>
- <div class="scan-input-content-cell scan-input-options-cell scan-input-advanced-only" data-property="search-options">
- <label class="scan-input-checkbox-item">
- <label class="checkbox"><input type="checkbox" class="scan-input-settings-checkbox" data-property="options.searchTerms"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span>Search for terms</span>
- </label>
- <label class="scan-input-checkbox-item">
- <label class="checkbox"><input type="checkbox" class="scan-input-settings-checkbox" data-property="options.searchKanji"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span>Search for kanji</span>
- </label>
- </div>
-
- <div class="scan-input-prefix-cell scan-input-options-cell scan-input-advanced-only" data-property="touch-pen-options"><span>Touch &amp; pen:</span></div>
- <div class="scan-input-content-cell scan-input-options-cell scan-input-advanced-only" data-property="touch-pen-options">
- <label class="scan-input-checkbox-item">
- <label class="checkbox"><input type="checkbox" class="scan-input-settings-checkbox" data-property="options.scanOnTouchMove"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span>Scan on touch move</span>
- </label>
- <label class="scan-input-checkbox-item">
- <label class="checkbox"><input type="checkbox" class="scan-input-settings-checkbox" data-property="options.scanOnPenHover"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span>Scan on pen hover</span>
- </label>
- <label class="scan-input-checkbox-item">
- <label class="checkbox"><input type="checkbox" class="scan-input-settings-checkbox" data-property="options.scanOnPenPress"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span>Scan on pen press</span>
- </label>
- <label class="scan-input-checkbox-item">
- <label class="checkbox"><input type="checkbox" class="scan-input-settings-checkbox" data-property="options.scanOnPenRelease"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span>Scan on pen release</span>
- </label>
- <label class="scan-input-checkbox-item">
- <label class="checkbox"><input type="checkbox" class="scan-input-settings-checkbox" data-property="options.preventTouchScrolling"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span>Prevent touch/pen scrolling</span>
- </label>
- </div>
- </div>
-</div></template>
-
-<template id="scanning-inputs-menu-template"><div class="popup-menu-container" tabindex="-1" role="dialog"><div class="popup-menu"><div class="popup-menu-body">
- <button class="popup-menu-item" data-menu-action="showAdvanced">Show advanced options</button>
- <button class="popup-menu-item" data-menu-action="hideAdvanced">Hide advanced options</button>
- <button class="popup-menu-item" data-menu-action="clearInputs">Clear inputs</button>
- <button class="popup-menu-item" data-menu-action="remove">Remove</button>
-</div></div></div></template>
-
-
-<!-- Input action prevention modal -->
-<div id="input-action-prevention-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
- <div class="modal-header"><div class="modal-title">Input Action Prevention</div></div>
- <div class="modal-body">
- <strong>Prevent middle mouse button actions on:</strong>
- <div class="flex-column-nowrap flex-column-nowrap-spaced margin-left">
- <label class="flex-label">
- <label class="checkbox"><input type="checkbox" data-setting="scanning.preventMiddleMouse.onWebPages"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span>Webpages</span>
- </label>
- <label class="flex-label">
- <label class="checkbox"><input type="checkbox" data-setting="scanning.preventMiddleMouse.onPopupPages"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span>Popups</span>
- </label>
- <label class="flex-label">
- <label class="checkbox"><input type="checkbox" data-setting="scanning.preventMiddleMouse.onSearchPages"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span>Search page</span>
- </label>
- <label class="flex-label">
- <label class="checkbox"><input type="checkbox" data-setting="scanning.preventMiddleMouse.onSearchQuery"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span>Search query</span>
- </label>
- </div>
- </div>
- <div class="modal-footer">
- <button data-modal-action="hide">Close</button>
- </div>
-</div></div>
-
-
-<!-- Anki cards modal -->
-<div id="anki-cards-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
- <div class="modal-header">
- <div class="modal-title">Anki Cards</div>
- <div class="modal-header-button-container">
- <div class="modal-header-button-group">
- <button class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
- <button class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
- </div>
- </div>
- </div>
- <div class="modal-body anki-card" id="anki-card-primary" data-anki-card-type="terms" data-anki-card-menu="anki-card-terms-field-menu">
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Card type</div>
- <div class="settings-item-description">Different types of definition can have separate settings.</div>
- </div>
- <div class="settings-item-right">
- <select id="anki-card-primary-type">
- <option value="terms" data-anki-card-menu="anki-card-terms-field-menu" selected>Terms</option>
- <option value="kanji" data-anki-card-menu="anki-card-kanji-field-menu">Kanji</option>
- </select>
- </div>
- </div></div>
- <div class="modal-separator-line"></div>
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Deck</div>
- </div>
- <div class="settings-item-right">
- <select class="anki-card-deck"></select>
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Model</div>
- </div>
- <div class="settings-item-right">
- <select class="anki-card-model"></select>
- </div>
- </div></div>
- <div class="anki-card-fields">
- <div class="anki-card-field-name-header" data-persistent="true">Field</div>
- <div class="anki-card-field-input-header" data-persistent="true">Value</div>
- </div>
- </div>
- <div class="modal-footer">
- <button class="low-emphasis" data-modal-action="show,anki-cards-info">Help</button>
- <button data-modal-action="hide">Close</button>
- </div>
-</div></div>
-
-<div id="anki-cards-info-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-full">
- <div class="modal-header">
- <div class="modal-title">Anki Card Information</div>
- <div class="modal-header-button-container">
- <div class="modal-header-button-group">
- <button class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
- <button class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
- </div>
- </div>
- </div>
- <div class="modal-body">
- <p>
- Anki card fields can be populated with information about a term or kanji character by using field markers.
- When a card is being generated, field markers are replaced with information about the term or kanji by using the installed dictionaries.
- Several preset markers are available, which are described below.
- Markers can be customized by adjusting the <a data-modal-action="show,anki-card-templates">Anki card templates</a>.
- </p>
- <p>
- Anki requires the first field in a model to be unique for a card;
- therefore, it is recommended to use <code class="anki-field-marker">{expression}</code> as the marker for the first field of term cards,
- or <code class="anki-field-marker">{character}</code> for kanji cards.
- </p>
- <table class="anki-field-marker-info-table margin-above">
- <tbody>
- <tr class="anki-field-marker-info-table-heading">
- <td>Marker (for terms)</td>
- <td>Description</td>
- </tr>
-
- <tr>
- <td><code class="anki-field-marker">{audio}</code></td>
- <td>Audio sample of a native speaker's pronunciation in MP3 format, if available.</td>
- </tr>
- <tr>
- <td><code class="anki-field-marker">{conjugation}</code></td>
- <td>Conjugation path from the raw inflected term to the source term.</td>
- </tr>
- <tr>
- <td><code class="anki-field-marker">{expression}</code></td>
- <td>Term expressed using kanji. If kanji expression is not available, kana is used.</td>
- </tr>
- <tr>
- <td><code class="anki-field-marker">{furigana}</code></td>
- <td>
- Term expressed as kanji with furigana displayed above it.
- Example: <ruby>日本語<rt>にほんご</rt></ruby>.
- </td>
- </tr>
- <tr>
- <td><code class="anki-field-marker">{furigana-plain}</code></td>
- <td>
- Term expressed as kanji with furigana displayed next to it in brackets.
- Example: 日本語[にほんご].
- </td>
- </tr>
- <tr>
- <td><code class="anki-field-marker">{glossary}</code></td>
- <td>List of definitions for the term.</td>
- </tr>
- <tr>
- <td><code class="anki-field-marker">{glossary-brief}</code></td>
- <td>List of definitions for the term in a more compact format.</td>
- </tr>
- <tr>
- <td><code class="anki-field-marker">{glossary-no-dictionary}</code></td>
- <td>List of definitions for the term, except the dictionary tag is omitted.</td>
- </tr>
- <tr>
- <td><code class="anki-field-marker">{pitch-accents}</code></td>
- <td>List of pitch accent downstep notations for the term.</td>
- </tr>
- <tr>
- <td><code class="anki-field-marker">{pitch-accent-graphs}</code></td>
- <td>List of pitch accent graphs for the term.</td>
- </tr>
- <tr>
- <td><code class="anki-field-marker">{pitch-accent-positions}</code></td>
- <td>List of accent downstep positions for the term as a number.</td>
- </tr>
- <tr>
- <td><code class="anki-field-marker">{reading}</code></td>
- <td>Kana reading for the term, or empty for terms where the expression is the reading.</td>
- </tr>
- <tr>
- <td><code class="anki-field-marker">{tags}</code></td>
- <td>Grammar and usage tags providing information about the term.</td>
- </tr>
-
- <tr class="anki-field-marker-info-table-heading">
- <td>Marker (for kanji)</td>
- <td>Description</td>
- </tr>
-
- <tr>
- <td><code class="anki-field-marker">{character}</code></td>
- <td>Unicode glyph representing the current kanji.</td>
- </tr>
- <tr>
- <td><code class="anki-field-marker">{glossary}</code></td>
- <td>List of definitions for the kanji.</td>
- </tr>
- <tr>
- <td><code class="anki-field-marker">{kunyomi}</code></td>
- <td>Kunyomi (Japanese reading) for the kanji, expressed as katakana.</td>
- </tr>
- <tr>
- <td><code class="anki-field-marker">{onyomi}</code></td>
- <td>Onyomi (Chinese reading) for the kanji, expressed as hiragana.</td>
- </tr>
- <tr>
- <td><code class="anki-field-marker">{stroke-count}</code></td>
- <td>Number of strokes that the kanji character has.</td>
- </tr>
-
- <tr class="anki-field-marker-info-table-heading">
- <td>Marker (for both)</td>
- <td>Description</td>
- </tr>
-
- <tr>
- <td><code class="anki-field-marker">{clipboard-image}</code></td>
- <td>An image which is stored in the system clipboard, if available.</td>
- </tr>
- <tr>
- <td><code class="anki-field-marker">{clipboard-text}</code></td>
- <td>Text which is stored in the system clipboard, if available.</td>
- </tr>
- <tr>
- <td><code class="anki-field-marker">{cloze-body}</code></td>
- <td>Original inflected term as it appeared before being reduced to dictionary form by Yomichan.</td>
- </tr>
- <tr>
- <td><code class="anki-field-marker">{cloze-prefix}</code></td>
- <td>Fragment of the containing <code class="anki-field-marker">{sentence}</code> starting at the beginning of <code class="anki-field-marker">{sentence}</code> until the beginning of <code class="anki-field-marker">{cloze-body}</code>.</td>
- </tr>
- <tr>
- <td><code class="anki-field-marker">{cloze-suffix}</code></td>
- <td>Fragment of the containing <code class="anki-field-marker">{sentence}</code> starting at the end of <code class="anki-field-marker">{cloze-body}</code> until the end of <code class="anki-field-marker">{sentence}</code>.</td>
- </tr>
- <tr>
- <td><code class="anki-field-marker">{dictionary}</code></td>
- <td>Name of the dictionary from which the card is being created.</td>
- </tr>
- <tr>
- <td><code class="anki-field-marker">{document-title}</code></td>
- <td>Title of the web page that the term or kanji appeared in.</td>
- </tr>
- <tr>
- <td><code class="anki-field-marker">{screenshot}</code></td>
- <td>Screenshot of the web page taken at the time the term or kanji was added.</td>
- </tr>
- <tr>
- <td><code class="anki-field-marker">{sentence}</code></td>
- <td>Sentence, quote, or phrase that the term or kanji appears in from the source content.</td>
- </tr>
- <tr>
- <td><code class="anki-field-marker">{url}</code></td>
- <td>Address of the web page in which the term or kanji appeared in.</td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="modal-footer">
- <button data-modal-action="hide">Close</button>
- </div>
-</div></div>
-
-
-<!-- Anki card templates -->
-<template id="anki-card-field-template"><div class="anki-card-field-name-container"><span class="anki-card-field-name"></span></div>
-<div class="anki-card-field-value-container">
- <input type="text" class="anki-card-field-value input-with-suffix-button" autocomplete="off">
- <button class="anki-card-field-value-menu-button input-suffix-button input-suffix-icon-button" data-menu-position="below left"><span class="icon icon-button-icon-light" data-icon="material-down-arrow"></span></button>
-</div></template>
-
-<template id="anki-card-terms-field-menu-template"><div class="popup-menu-container" tabindex="-1" role="dialog"><div class="popup-menu"><div class="popup-menu-body"></div></div></div></template>
-
-<template id="anki-card-kanji-field-menu-template"><div class="popup-menu-container" tabindex="-1" role="dialog"><div class="popup-menu"><div class="popup-menu-body"></div></div></div></template>
-
-<template id="anki-card-all-field-menu-template"><div class="popup-menu-container" tabindex="-1" role="dialog"><div class="popup-menu"><div class="popup-menu-body"></div></div></div></template>
-
-
-<!-- Anki field template modals -->
-<div id="anki-card-templates-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-full">
- <div class="modal-header"><div class="modal-title">Anki Card Templates</div></div>
- <div class="modal-body anki-card-templates-layout">
- <div class="anki-card-templates-info">
- <p>
- Anki card fields are formatted using the <a href="https://handlebarsjs.com/" target="_blank" rel="noopener noreferrer">Handlebars.js</a>
- template rendering engine.
- Advanced users can modify these templates for full control over what information is included in Anki cards.
- </p>
- <p>
- Consider copy-pasting the source into a code editor that supports syntax highlighting for easier editing.
- </p>
- </div>
- <textarea autocomplete="off" spellcheck="false" id="anki-card-templates-textarea" class="margin-above" data-tab-action="indent,4"></textarea>
- <div id="anki-card-templates-compile-result" class="danger-text margin-above" hidden></div>
- <div class="anki-card-templates-test-container margin-above">
- <p>
- Card templates can be tested using the inputs below.
- </p>
- <div class="anki-card-templates-test-table margin-above">
- <div class="anki-card-templates-test-table-header">Scanned text</div>
- <div class="anki-card-templates-test-table-header">Card field</div>
- <div></div>
- <input type="text" id="anki-card-templates-test-text-input" class="form-control" value="読め" placeholder="Preview text" autocomplete="off" lang="ja">
- <div class="anki-card-templates-test-input-container">
- <input type="text" class="input-with-suffix-button" id="anki-card-templates-test-field-input" value="{expression}" placeholder="{marker}" autocomplete="off" spellcheck="false">
- <button class="input-suffix-button input-suffix-icon-button" id="anki-card-templates-test-field-menu-button" data-menu="anki-card-all-field-menu" data-menu-position="below left"><span class="icon icon-button-icon-light" data-icon="material-down-arrow"></span></button>
- </div>
- <button id="anki-card-templates-test-render-button">Test</button>
- </div>
- </div>
- <div class="margin-above" id="anki-card-templates-render-result"><em>Card render result</em></div>
- </div>
- <div class="modal-footer">
- <button class="danger" id="anki-card-templates-reset-button">Reset Templates</button>
- <button data-modal-action="hide">Close</button>
- </div>
-</div></div>
-
-<div id="anki-card-templates-reset-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
- <div class="modal-header"><div class="modal-title">Reset Anki Card Templates</div></div>
- <div class="modal-body">
- <p class="danger-text">
- Are you sure you want to reset the card templates to their default value?
- Any changes you made will be lost.
- </p>
- </div>
- <div class="modal-footer">
- <button class="low-emphasis" data-modal-action="hide">Cancel</button>
- <button class="danger" id="anki-card-templates-reset-button-confirm">Reset Templates</button>
- </div>
-</div></div>
-
-
-<!-- Import/export modals -->
-<div id="settings-import-error-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
- <div class="modal-header"><div class="modal-title">Import Error</div></div>
- <div class="modal-body">
- <p>An error occurred while trying to import the settings file:</p>
- <p class="danger-text" id="settings-import-error-message"></p>
- <p>Additional info can be found in the developer console.</p>
- </div>
- <div class="modal-footer">
- <button class="low-emphasis" data-modal-action="hide">Close</button>
- </div>
-</div></div>
-
-<div id="settings-import-warning-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
- <div class="modal-header"><div class="modal-title">Import Security Warning</div></div>
- <div class="modal-body">
- <p>
- Settings file contains settings which may pose a security risk.
- Only import settings from sources you trust.
- </p>
- <ul class="danger-text" id="settings-import-warning-message"></ul>
- </div>
- <div class="modal-footer">
- <button class="low-emphasis" data-modal-action="hide">Cancel</button>
- <button class="danger settings-import-warning-import-button">Import</button>
- <button class="settings-import-warning-import-button" data-import-sanitize="true">Sanitize and Import</button>
- </div>
-</div></div>
-
-<div id="settings-reset-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
- <div class="modal-header"><div class="modal-title">Reset Settings</div></div>
- <div class="modal-body">
- <p class="danger-text">
- You are about to reset all Yomichan settings back to their default values.
- This will delete all custom profiles you may have created.
- <strong>This action cannot be undone.</strong>
- </p>
- <p>
- Consider making a backup using the <em>Export Settings</em> button before resetting
- if you want to be able to revert.
- </p>
- <p>
- Dictionary data will not be deleted, but any installed dictionaries
- will need to be re-enabled.
- </p>
- </div>
- <div class="modal-footer">
- <button class="low-emphasis" data-modal-action="hide">Cancel</button>
- <button class="danger" id="settings-reset-confirm-button">Reset All Settings</button>
- </div>
-</div></div>
-
-
-<!-- Translation modals -->
-<div id="translation-text-replacement-patterns-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
- <div class="modal-header">
- <div class="modal-title">Custom Text Replacement Patterns</div>
- <div class="modal-header-button-container">
- <div class="modal-header-button-group">
- <button class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
- <button class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
- </div>
- </div>
- </div>
- <div class="modal-body">
- <div class="settings-item"><div class="settings-item-inner"><div class="settings-item-left"><div class="settings-item-label">
- Text replacement patterns are used to modify or remove text that matches certain patterns.
- Patterns are defined using
- <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions" target="_blank" rel="noreferrer noopener">regular expression syntax</a>,
- and the replacement text can use certain
- <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_string_as_a_parameter" target="_blank" rel="noreferrer noopener">special replacement patterns</a>.
- </div></div></div></div>
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">
- Search original text
- </div>
- <div class="settings-item-description">
- The original unmodified text will also be searched for definitions.
- </div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="translation.textReplacements.searchOriginal"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- <div class="settings-item">
- <div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Text replacement patterns</div>
- </div>
- <div class="settings-item-right">
- <button id="translation-text-replacement-add" class="low-emphasis">Add</button>
- </div>
- </div>
- <div class="settings-item-children">
- <div id="translation-text-replacement-list" class="generic-list"></div>
- <div id="translation-text-replacement-list-empty"><em>None defined</em></div>
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <button data-modal-action="hide">Close</button>
- </div>
-</div></div>
-
-
-<!-- Translation templates -->
-<template id="translation-text-replacement-entry-template"><div class="translation-text-replacement-entry">
- <div class="translation-text-replacement-index generic-list-index-prefix"></div>
- <div class="translation-text-replacement-pattern-label">Pattern:</div>
- <div class="translation-text-replacement-replacement-label">Replacement:</div>
- <div class="translation-text-replacement-pattern-container">
- <input type="text" class="translation-text-replacement-pattern code">
- <label class="translation-text-replacement-checkbox-container">
- <label class="checkbox"><input type="checkbox" class="translation-text-replacement-checkbox translation-text-replacement-pattern-ignore-case"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span class="translation-text-replacement-checkbox-label">Ignore case</span>
- </label>
- </div>
- <div class="translation-text-replacement-replacement-container">
- <input type="text" class="translation-text-replacement-replacement code">
- </div>
- <button class="icon-button translation-text-replacement-button" data-menu="translation-text-replacement-entry-menu" data-menu-position="below left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button>
-
- <div class="translation-text-replacement-test-label translation-text-replacement-test-node">Test Input:</div>
- <div class="translation-text-replacement-test-container translation-text-replacement-test-node">
- <input type="text" class="translation-text-replacement-test-input" lang="ja">
- <div class="translation-text-replacement-test-label-inner">Output:</div>
- <input type="text" class="translation-text-replacement-test-output" lang="ja" readonly>
- </div>
-</div></template>
-
-<template id="translation-text-replacement-entry-menu-template"><div class="popup-menu-container" tabindex="-1" role="dialog"><div class="popup-menu"><div class="popup-menu-body">
- <button class="popup-menu-item" data-menu-action="showTest">Test</button>
- <button class="popup-menu-item" data-menu-action="hideTest">Hide test</button>
- <button class="popup-menu-item" data-menu-action="remove">Remove</button>
-</div></div></div></template>
-
-
-<!-- Sentence parsing modal -->
-<div id="sentence-termination-characters-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
- <div class="modal-header">
- <div class="modal-title">Sentence Termination Characters</div>
- <div class="modal-header-button-container">
- <div class="modal-header-button-group">
- <button class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
- <button class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
- </div>
- </div>
- </div>
- <div class="modal-body">
- <p>
- Sentences are terminated by punctuation and quotation marks, which can both be configured below.
- </p>
- <table class="sentence-termination-character-list-table" id="sentence-termination-character-list-table" hidden>
- <thead><tr>
- <td>#</td>
- <td>Enabled</td>
- <td>Type</td>
- <td>Character 1</td>
- <td>Character 2</td>
- <td>Include character in sentence</td>
- <td></td>
- </tr></thead>
- <tbody class="sentence-termination-character-list generic-list" id="sentence-termination-character-list"></tbody>
- </table>
- <div id="sentence-termination-character-list-empty" hidden>
- No terminators defined.
- </div>
- </div>
- <div class="modal-footer">
- <button class="low-emphasis danger" id="sentence-termination-character-list-reset">Reset</button>
- <button class="low-emphasis" id="sentence-termination-character-list-add">Add</button>
- <button data-modal-action="hide">Close</button>
- </div>
-</div></div>
-
-
-<!-- Sentence parsing templates -->
-<template id="sentence-termination-character-entry-template"><tr class="sentence-termination-character-entry">
- <td class="generic-list-index-prefix"></td>
- <td>
- <label class="toggle"><input type="checkbox" class="sentence-termination-character-enabled"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </td>
- <td>
- <select class="sentence-termination-character-type">
- <option value="terminator">Terminator</option>
- <option value="quote">Quote</option>
- </select>
- </td>
- <td>
- <input type="text" class="sentence-termination-character-input1" maxlength="1" lang="ja">
- </td>
- <td>
- <input type="text" class="sentence-termination-character-input2" maxlength="1" lang="ja">
- <div class="sentence-termination-character-input2-alt">&mdash;</div>
- </td>
- <td>
- <div class="sentence-termination-character-include-list">
- <label class="sentence-termination-character-include">
- <label class="checkbox"><input type="checkbox" class="sentence-termination-character-include-at-start"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span>At start</span>
- </label>
- <label class="sentence-termination-character-include">
- <label class="checkbox"><input type="checkbox" class="sentence-termination-character-include-at-end"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span>At end</span>
- </label>
- </div>
- </td>
- <td>
- <button class="icon-button sentence-termination-character-entry-button" data-menu="sentence-termination-character-entry-menu" data-menu-position="below left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button>
- </td>
-</tr></template>
-
-<template id="sentence-termination-character-entry-menu-template"><div class="popup-menu-container" tabindex="-1" role="dialog"><div class="popup-menu"><div class="popup-menu-body">
- <button class="popup-menu-item" data-menu-action="delete">Delete</button>
-</div></div></div></template>
-
-
-<!-- Keyboard shortcuts modal -->
-<div id="keyboard-shortcuts-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-full">
- <div class="modal-header">
- <div class="modal-title">Keyboard Shortcuts</div>
- <div class="modal-header-button-container">
- <div class="modal-header-button-group">
- <button class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
- <button class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
- </div>
- </div>
- </div>
- <div class="modal-body">
- <div class="hotkey-list generic-list" id="hotkey-list"></div>
- <div class="hotkey-list-empty" id="hotkey-list-empty" hidden>
- No keyboard shortcuts defined.
- </div>
- </div>
- <div class="modal-footer">
- <button class="low-emphasis danger" id="hotkey-list-reset">Reset</button>
- <button class="low-emphasis" id="hotkey-list-add">Add</button>
- <button data-modal-action="hide">Close</button>
- </div>
-</div></div>
-
-<div id="extension-keyboard-shortcuts-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
- <div class="modal-header">
- <div class="modal-title">Native Keyboard Shortcuts</div>
- <div class="modal-header-button-container">
- <div class="modal-header-button-group">
- <button class="icon-button modal-header-button" data-modal-action="expand"><span class="icon-button-inner"><span class="icon" data-icon="expand"></span></span></button>
- <button class="icon-button modal-header-button" data-modal-action="collapse"><span class="icon-button-inner"><span class="icon" data-icon="collapse"></span></span></button>
- </div>
- </div>
- </div>
- <div class="modal-body">
- <div>
- <p data-show-for-browser="chrome edge">
- The native keyboard shortcuts are listed below,
- but cannot be configured from within the extension on this browser.
- To configure these shortcuts:
- </p>
-
- <p data-show-for-browser="firefox">
- The native keyboard shortcuts can be configured below on this browser,
- or by doing the following:
- </p>
-
- <ul data-show-for-browser="chrome">
- <li>Open <a data-special-url="chrome://extensions/shortcuts">chrome://extensions/shortcuts</a> in a new tab.</li>
- <li>Find the <em>Yomichan</em> section and configure the shortcuts.</li>
- </ul>
-
- <ul data-show-for-browser="edge">
- <li>Open <a data-special-url="edge://extensions/shortcuts">edge://extensions/shortcuts</a> in a new tab.</li>
- <li>Find the <em>Yomichan</em> section and configure the shortcuts.</li>
- </ul>
-
- <ul data-show-for-browser="firefox">
- <li>Open the extensions page (<a data-select-on-click="">about:addons</a>)</li>
- <li>Click the button on the right with the gear icon, then click <em>Manage Extension Shortcuts</em>.</li>
- <li>Find the <em>Yomichan</em> section and configure the shortcuts.</li>
- </ul>
- </div>
- <div class="modal-separator-line"></div>
- <div class="modal-settings-group" id="extension-hotkey-list"></div>
- </div>
- <div class="modal-footer">
- <button class="low-emphasis danger" id="extension-hotkey-list-reset-all">Reset All</button>
- <button class="low-emphasis danger" id="extension-hotkey-list-clear-all">Clear All</button>
- <button data-modal-action="hide">Close</button>
- </div>
-</div></div>
-
-<!-- Keyboard shortcuts templates -->
-<template id="hotkey-list-item-template"><div class="hotkey-list-item"><div class="hotkey-list-item-grid">
- <div class="hotkey-list-item-index-cell generic-list-index-prefix"></div>
- <div class="hotkey-list-item-button-cell">
- <div class="input-height-icon-button-container">
- <button class="icon-button hotkey-list-item-button" data-menu="hotkey-list-item-menu" data-menu-position="below left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button>
- </div>
- </div>
-
- <div class="hotkey-list-item-input-label-cell">Input:</div>
- <div class="hotkey-list-item-input-cell">
- <input type="text" class="hotkey-list-item-input" autocomplete="off" spellcheck="false" placeholder="No input" data-property="include">
- <label class="toggle hotkey-list-item-enabled-label"><input type="checkbox" class="hotkey-list-item-enabled"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
-
- <div class="hotkey-list-item-action-label-cell">Action:</div>
- <div class="hotkey-list-item-action-cell">
- <select class="hotkey-list-item-action">
- <option value="" data-scopes="popup search">None</option>
- <option value="close" data-scopes="popup search">Close</option>
- <option value="focusSearchBox" data-scopes="search">Focus search box</option>
- <option value="nextEntry" data-scopes="popup search">Go to next entry</option>
- <option value="nextEntry3" data-scopes="popup search">Go to next entry (x3)</option>
- <option value="previousEntry" data-scopes="popup search">Go to previous entry</option>
- <option value="previousEntry3" data-scopes="popup search">Go to previous entry (x3)</option>
- <option value="lastEntry" data-scopes="popup search">Go to last entry</option>
- <option value="firstEntry" data-scopes="popup search">Go to first entry</option>
- <option value="nextEntryDifferentDictionary" data-scopes="popup search">Go to next dictionary</option>
- <option value="previousEntryDifferentDictionary" data-scopes="popup search">Go to previous dictionary</option>
- <option value="historyBackward" data-scopes="popup search">Navigate backward in history</option>
- <option value="historyForward" data-scopes="popup search">Navigate forward in history</option>
- <option value="addNoteKanji" data-scopes="popup search">Add kanji note</option>
- <option value="addNoteTermKanji" data-scopes="popup search">Add term note</option>
- <option value="addNoteTermKana" data-scopes="popup search">Add term note (reading)</option>
- <option value="viewNote" data-scopes="popup search">View note</option>
- <option value="playAudio" data-scopes="popup search">Play audio</option>
- <option value="copyHostSelection" data-scopes="popup">Copy host window selection</option>
- <option value="scanSelectedText" data-scopes="web">Scan selected text</option>
- </select>
- <div class="hotkey-list-item-flex-row">
- <div class="hotkey-list-item-flex-row-label">Scopes:</div>
- <div class="hotkey-list-item-flex-row">
- <label class="hotkey-scope-checkbox-container" data-scope="web">
- <label class="checkbox"><input type="checkbox" class="hotkey-scope-checkbox" data-scope="web"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span>Web</span>
- </label>
- <label class="hotkey-scope-checkbox-container" data-scope="popup">
- <label class="checkbox"><input type="checkbox" class="hotkey-scope-checkbox" data-scope="popup"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span>Popup</span>
- </label>
- <label class="hotkey-scope-checkbox-container" data-scope="search">
- <label class="checkbox"><input type="checkbox" class="hotkey-scope-checkbox" data-scope="search"><span class="checkbox-body"><span class="checkbox-fill"></span><span class="checkbox-border"></span><span class="checkbox-check"></span></span></label>
- <span>Search</span>
- </label>
- </div>
- </div>
- </div>
-</div></div></template>
-
-<template id="extension-hotkey-list-item-template"><div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label"></div>
- </div>
- <div class="settings-item-right">
- <div class="flex-row-nowrap">
- <input type="text">
- <button class="icon-button extension-hotkey-list-item-button" data-menu="extension-hotkey-list-item-menu" data-menu-position="below left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button>
- </div>
- </div>
-</div></div></template>
-
-<template id="hotkey-list-item-menu-template"><div class="popup-menu-container" tabindex="-1" role="dialog"><div class="popup-menu"><div class="popup-menu-body">
- <button class="popup-menu-item" data-menu-action="clearInputs">Clear input</button>
- <button class="popup-menu-item" data-menu-action="resetInput">Reset input</button>
- <button class="popup-menu-item" data-menu-action="delete">Delete</button>
-</div></div></div></template>
-
-<template id="extension-hotkey-list-item-menu-template"><div class="popup-menu-container" tabindex="-1" role="dialog"><div class="popup-menu"><div class="popup-menu-body">
- <button class="popup-menu-item" data-menu-action="clearInput">Clear input</button>
- <button class="popup-menu-item" data-menu-action="resetInput">Reset input</button>
-</div></div></div></template>
-
-
-<!-- Scripts -->
-<script src="/mixed/lib/jszip.min.js"></script>
-<script src="/mixed/lib/wanakana.min.js"></script>
-
-<script src="/mixed/js/core.js"></script>
-<script src="/mixed/js/yomichan.js"></script>
-<script src="/mixed/js/comm.js"></script>
-<script src="/mixed/js/environment.js"></script>
-<script src="/mixed/js/api.js"></script>
-<script src="/mixed/js/japanese.js"></script>
-
-<script src="/mixed/js/audio-system.js"></script>
-<script src="/mixed/js/cache-map.js"></script>
-<script src="/mixed/js/dictionary-data-util.js"></script>
-<script src="/mixed/js/document-focus-controller.js"></script>
-<script src="/mixed/js/document-util.js"></script>
-<script src="/mixed/js/dom-data-binder.js"></script>
-<script src="/mixed/js/hotkey-util.js"></script>
-<script src="/mixed/js/html-template-collection.js"></script>
-<script src="/mixed/js/object-property-accessor.js"></script>
-<script src="/mixed/js/panel-element.js"></script>
-<script src="/mixed/js/popup-menu.js"></script>
-<script src="/mixed/js/selector-observer.js"></script>
-<script src="/mixed/js/task-accumulator.js"></script>
-<script src="/mixed/js/text-to-speech-audio.js"></script>
-
-<script src="/bg/js/anki.js"></script>
-<script src="/bg/js/anki-note-builder.js"></script>
-<script src="/bg/js/options.js"></script>
-<script src="/bg/js/database.js"></script>
-<script src="/bg/js/dictionary-database.js"></script>
-<script src="/bg/js/dictionary-importer.js"></script>
-<script src="/bg/js/json-schema.js"></script>
-<script src="/bg/js/media-utility.js"></script>
-<script src="/bg/js/permissions-util.js"></script>
-<script src="/bg/js/template-patcher.js"></script>
-<script src="/bg/js/template-renderer-proxy.js"></script>
-
-<script src="/bg/js/settings/keyboard-mouse-input-field.js"></script>
-<script src="/bg/js/settings/profile-conditions-ui.js"></script>
-
-<script src="/bg/js/settings/anki-controller.js"></script>
-<script src="/bg/js/settings/anki-templates-controller.js"></script>
-<script src="/bg/js/settings/audio-controller.js"></script>
-<script src="/bg/js/settings/backup-controller.js"></script>
-<script src="/bg/js/settings/permissions-toggle-controller.js"></script>
-<script src="/bg/js/settings/dictionary-controller.js"></script>
-<script src="/bg/js/settings/dictionary-import-controller.js"></script>
-<script src="/bg/js/settings/generic-setting-controller.js"></script>
-<script src="/bg/js/settings/modal.js"></script>
-<script src="/bg/js/settings/modal-controller.js"></script>
-<script src="/bg/js/settings/popup-preview-controller.js"></script>
-<script src="/bg/js/settings/profile-controller.js"></script>
-<script src="/bg/js/settings/scan-inputs-controller.js"></script>
-<script src="/bg/js/settings/scan-inputs-simple-controller.js"></script>
-<script src="/bg/js/settings/settings-controller.js"></script>
-<script src="/bg/js/settings/status-footer.js"></script>
-<script src="/bg/js/settings/storage-controller.js"></script>
-
-<script src="/bg/js/settings2/extension-keyboard-shortcuts-controller.js"></script>
-<script src="/bg/js/settings2/keyboard-shortcuts-controller.js"></script>
-<script src="/bg/js/settings2/mecab-controller.js"></script>
-<script src="/bg/js/settings2/nested-popups-controller.js"></script>
-<script src="/bg/js/settings2/popup-window-controller.js"></script>
-<script src="/bg/js/settings2/secondary-search-dictionary-controller.js"></script>
-<script src="/bg/js/settings2/sentence-termination-characters-controller.js"></script>
-<script src="/bg/js/settings2/settings-display-controller.js"></script>
-<script src="/bg/js/settings2/translation-text-replacements-controller.js"></script>
-
-<script src="/bg/js/settings2/settings-main.js"></script>
-
-</body>
-</html>
diff --git a/ext/bg/template-renderer.html b/ext/bg/template-renderer.html
deleted file mode 100644
index 68cba889..00000000
--- a/ext/bg/template-renderer.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width,initial-scale=1">
- <title>Yomichan Handlebars Sandbox</title>
- <link rel="icon" type="image/png" href="/images/icon16.png" sizes="16x16">
- <link rel="icon" type="image/png" href="/images/icon19.png" sizes="19x19">
- <link rel="icon" type="image/png" href="/images/icon32.png" sizes="32x32">
- <link rel="icon" type="image/png" href="/images/icon38.png" sizes="38x38">
- <link rel="icon" type="image/png" href="/images/icon48.png" sizes="48x48">
- <link rel="icon" type="image/png" href="/images/icon64.png" sizes="64x64">
- <link rel="icon" type="image/png" href="/images/icon128.png" sizes="128x128">
-</head>
-<body>
- <script src="/mixed/lib/handlebars.min.js"></script>
- <script src="/mixed/js/dictionary-data-util.js"></script>
- <script src="/mixed/js/japanese.js"></script>
- <script src="/bg/js/anki-note-data.js"></script>
- <script src="/bg/js/template-renderer.js"></script>
- <script src="/bg/js/template-renderer-frame-api.js"></script>
- <script src="/bg/js/template-renderer-frame-main.js"></script>
-</body>
-</html>
diff --git a/ext/bg/welcome.html b/ext/bg/welcome.html
deleted file mode 100644
index 53c386fd..00000000
--- a/ext/bg/welcome.html
+++ /dev/null
@@ -1,355 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width,initial-scale=1">
- <title>Welcome to Yomichan!</title>
- <link rel="icon" type="image/png" href="/images/icon16.png" sizes="16x16">
- <link rel="icon" type="image/png" href="/images/icon19.png" sizes="19x19">
- <link rel="icon" type="image/png" href="/images/icon32.png" sizes="32x32">
- <link rel="icon" type="image/png" href="/images/icon38.png" sizes="38x38">
- <link rel="icon" type="image/png" href="/images/icon48.png" sizes="48x48">
- <link rel="icon" type="image/png" href="/images/icon64.png" sizes="64x64">
- <link rel="icon" type="image/png" href="/images/icon128.png" sizes="128x128">
- <link rel="stylesheet" type="text/css" href="/css/material.css">
- <link rel="stylesheet" type="text/css" href="/css/settings2.css">
-</head>
-<body>
-
-<!-- Main content -->
-<div class="content-outer"><div class="content">
-<div class="content-center">
-
- <span tabindex="-1" id="content-scroll-focus"></span>
-
- <h1>Welcome to Yomichan!</h1>
-
- <h2>Here are some basics to get started</h2>
- <div class="settings-group">
- <div class="settings-item">
- <div class="settings-item-inner"><div class="settings-item-left"><div class="settings-item-label">
- Clicking the <img src="/images/yomichan-icon.svg" class="inline-icon" alt=""> <em>Yomichan</em> button in the browser bar will open the quick-actions popup.
- </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.
- </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,
- 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,
- which has some helpful information and links about Yomichan.
- </div></div></div></div>
- </div>
- </div>
- <div class="settings-item">
- <div class="settings-item-inner"><div class="settings-item-left"><div class="settings-item-label">
- Yomichan requires one or more dictionaries to be installed in order to look up terms, kanji, and other information.
- 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.
- </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">
- <div class="settings-item-left">
- <div class="settings-item-label">Install or remove dictionaries&hellip;</div>
- </div>
- <div class="settings-item-right open-panel-button-container">
- <button class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
- </div>
- </div></div>
- </div>
- </div>
- <div class="settings-item">
- <div class="settings-item-inner"><div class="settings-item-left"><div class="settings-item-label">
- After dictionaries have been installed, webpage text can be scanned by moving the cursor while holding a modifier key.
- The default key is <kbd>Shift</kbd>, which can be disabled or configured below.
- </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">
- Clicking the <img src="/images/play-audio.svg" class="inline-icon" alt=""> <em>speaker</em> button of an entry in the search results
- will play an audio clip of a term's pronunciation using an online dictionary, if available.
- </div></div></div></div>
- <div class="settings-item"><div class="settings-item-inner"><div class="settings-item-left"><div class="settings-item-label">
- Clicking on a kanji character in a term's definition will show additional information about that character.
- <span class="light">(Requires a kanji dictionary to be installed.)</span>
- </div></div></div></div>
- </div>
- </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.
- </div></div></div>
- </div>
- </div>
-
- <h2>Basic customization</h2>
- <div class="settings-group">
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Show this welcome guide 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>
- </div>
- </div></div>
- <div class="settings-item">
- <div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Scan modifier key</div>
- <div class="settings-item-description">Hold a key while moving the cursor to scan text.</div>
- </div>
- <div class="settings-item-right">
- <select id="main-scan-modifier-key"></select>
- </div>
- </div>
- </div>
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Scan using middle mouse button</div>
- <div class="settings-item-description">Hold the middle mouse button while moving the cursor to scan text.</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" id="middle-mouse-button-scan"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div></div>
- <div class="settings-item">
- <div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Auto-hide search popup</div>
- <div class="settings-item-description">When no definitions are found after scanning text, the popup will automatically hide.</div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="scanning.autoHideResults"
- data-transform='{
- "type": "setVisibility",
- "selector": "#auto-hide-search-popup-options",
- "condition": {"op": "===", "value": true}
- }'
- ><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div>
- <div class="settings-item-children settings-item-children-group" id="auto-hide-search-popup-options" hidden>
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Popup auto-hide delay <span class="light">(in milliseconds)</span></div>
- </div>
- <div class="settings-item-right">
- <input type="number" data-setting="scanning.hideDelay" min="0">
- </div>
- </div></div>
- </div>
- </div>
- <div class="settings-item"><div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">Scan delay <span class="light">(in milliseconds)</span></div>
- <div class="settings-item-description">Change the delay before scanning occurs when no modifier key is required.</div>
- </div>
- <div class="settings-item-right">
- <input type="number" data-setting="scanning.delay" min="0">
- </div>
- </div></div>
- <div class="settings-item"><div class="settings-item-inner settings-item-inner-wrappable">
- <div class="settings-item-left">
- <div class="settings-item-label">Theme</div>
- <div class="settings-item-description">Adjust the style of the popup.</div>
- </div>
- <div class="settings-item-right">
- <select data-setting="general.popupTheme" class="short-width">
- <option value="default">Light</option>
- <option value="dark">Dark</option>
- </select>
- </div>
- </div></div>
- <a href="settings2.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>
- <div class="settings-item-right open-panel-button-container">
- <button class="icon-button"><span class="icon-button-inner"><span class="icon" data-icon="material-right-arrow"></span></span></button>
- </div>
- </div></a>
- </div>
-
- <div class="footer-padding"></div>
-
-</div>
-</div></div>
-
-
-<!-- Auxiliary content -->
-<div class="status-footer-container" hidden><div class="status-footer-container2">
- <div class="status-footer">
- <div class="status-footer-header"><div class="status-footer-header-label">Tasks in progress:</div><a class="status-footer-header-close">Close</a></div>
- <div class="status-footer-item dictionary-delete-progress" hidden>
- <div class="progress-labels"><div class="progress-info"></div><div class="progress-status"></div></div>
- <div class="progress-bar-track"><div class="progress-bar danger"></div></div>
- </div>
- <div class="status-footer-item dictionary-import-progress" hidden>
- <div class="progress-labels"><div class="progress-info"></div><div class="progress-status"></div></div>
- <div class="progress-bar-track"><div class="progress-bar"></div></div>
- </div>
- </div>
-</div></div>
-
-<div id="popup-menus"></div>
-
-
-<!-- Dictionary modals -->
-<div id="dictionaries-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content">
- <div class="modal-header"><div class="modal-title">Dictionaries</div></div>
- <div class="modal-body">
- <div class="settings-item">
- <div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">
- Enable support for prefix wildcard searches
- <a class="more-toggle more-only" data-parent-distance="4">(?)</a>
- </div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" data-setting="global.database.prefixWildcardsSupported" data-scope="global"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- </div>
- </div>
- <div class="settings-item-children more" hidden>
- <p>
- In order for dictionaries to support searches using prefix wildcards on the search page,
- some additional data must be stored in the database.
- Enabling this option will include this extra data for any new dictionaries that are imported.
- </p>
- <p class="warning-text">
- This option will not change any dictionaries that are already imported;
- they must be re-imported for the option to take effect.
- </p>
- <p>
- <a class="more-toggle" data-parent-distance="3">Hide&hellip;</a>
- </p>
- </div>
- </div>
-
- <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
- </div>
- </div>
- </div></div>
-
- <div class="warning-text margin-above no-dictionaries-installed-warning" hidden>
- No dictionaries have been installed yet.
- Visit the <a href="https://foosoft.net/projects/yomichan/#dictionaries" target="_blank" rel="noopener noreferrer">Yomichan homepage</a>
- for a list free dictionaries or click the <em>Import</em> button below to select a dictionary file to import.
- </div>
- <div id="dictionary-error" class="danger-text margin-above" hidden></div>
- <div id="dictionary-list" class="dictionary-list"></div>
- <div id="dictionary-list-extra" class="dictionary-list"></div>
-
- <div hidden><input type="file" id="dictionary-import-file-input" accept=".zip,application/zip" multiple></div>
- </div>
- <div class="modal-body-addon dictionary-delete-progress" hidden>
- <div class="progress-labels"><div class="progress-info"></div><div class="progress-status"></div></div>
- <div class="progress-bar-track"><div class="progress-bar danger"></div></div>
- </div>
- <div class="modal-body-addon dictionary-import-progress" hidden>
- <div class="progress-labels"><div class="progress-info"></div><div class="progress-status"></div></div>
- <div class="progress-bar-track"><div class="progress-bar"></div></div>
- </div>
- <div class="modal-footer">
- <button class="low-emphasis danger dictionary-database-mutating-input" id="dictionary-delete-all-button">Delete All</button>
- <button class="low-emphasis dictionary-database-mutating-input" id="dictionary-import-file-button">Import</button>
- <button data-modal-action="hide">Close</button>
- </div>
-</div></div>
-
-<div id="dictionary-confirm-delete-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
- <div class="modal-header"><div class="modal-title">Confirm Dictionary Deletion</div></div>
- <div class="modal-body">
- <p>Are you sure you want to delete the dictionary:</p>
- <p><strong id="dictionary-confirm-delete-name"></strong>?</p>
- <p class="danger-text">This action cannot be undone.</p>
- </div>
- <div class="modal-footer">
- <button class="low-emphasis" data-modal-action="hide">Cancel</button>
- <button class="danger" data-modal-action="hide" id="dictionary-confirm-delete-button">Delete</button>
- </div>
-</div></div>
-
-<div id="dictionary-confirm-delete-all-modal" class="modal" tabindex="-1" role="dialog" hidden><div class="modal-content modal-content-small">
- <div class="modal-header"><div class="modal-title">Confirm Dictionary Deletion</div></div>
- <div class="modal-body">
- <p>Are you sure you want to delete <strong>all dictionaries</strong>?</p>
- <p class="danger-text">This action cannot be undone.</p>
- </div>
- <div class="modal-footer">
- <button class="low-emphasis" data-modal-action="hide">Cancel</button>
- <button class="danger" data-modal-action="hide" id="dictionary-confirm-delete-all-button">Delete</button>
- </div>
-</div></div>
-
-
-<!-- Dictionary templates -->
-<template id="dictionary-template"><div class="settings-item dictionary-item">
- <div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label dictionary-info">
- <label class="toggle"><input type="checkbox" class="dictionary-enabled"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
- <span class="dictionary-info-label"><strong class="dictionary-title"></strong> <span class="light dictionary-version"></span></span>
- </div>
- </div>
- <div class="settings-item-right">
- <button class="icon-button dictionary-menu-button" data-menu="dictionary-menu" data-menu-position="below left"><span class="icon-button-inner"><span class="icon" data-icon="kebab-menu"></span></span></button>
- </div>
- </div>
-</div></template>
-
-<template id="dictionary-menu-template"><div class="popup-menu-container" tabindex="-1" role="dialog"><div class="popup-menu"><div class="popup-menu-body">
- <button class="popup-menu-item" data-menu-action="delete">Delete</button>
-</div></div></div></template>
-
-
-<!-- Scripts -->
-<script src="/mixed/lib/jszip.min.js"></script>
-
-<script src="/mixed/js/core.js"></script>
-<script src="/mixed/js/yomichan.js"></script>
-<script src="/mixed/js/comm.js"></script>
-<script src="/mixed/js/api.js"></script>
-
-<script src="/mixed/js/cache-map.js"></script>
-<script src="/mixed/js/document-focus-controller.js"></script>
-<script src="/mixed/js/document-util.js"></script>
-<script src="/mixed/js/dom-data-binder.js"></script>
-<script src="/mixed/js/hotkey-util.js"></script>
-<script src="/mixed/js/html-template-collection.js"></script>
-<script src="/mixed/js/object-property-accessor.js"></script>
-<script src="/mixed/js/panel-element.js"></script>
-<script src="/mixed/js/popup-menu.js"></script>
-<script src="/mixed/js/selector-observer.js"></script>
-<script src="/mixed/js/task-accumulator.js"></script>
-
-<script src="/bg/js/database.js"></script>
-<script src="/bg/js/dictionary-database.js"></script>
-<script src="/bg/js/dictionary-importer.js"></script>
-<script src="/bg/js/json-schema.js"></script>
-<script src="/bg/js/media-utility.js"></script>
-<script src="/bg/js/permissions-util.js"></script>
-
-<script src="/bg/js/settings/dictionary-controller.js"></script>
-<script src="/bg/js/settings/dictionary-import-controller.js"></script>
-<script src="/bg/js/settings/generic-setting-controller.js"></script>
-<script src="/bg/js/settings/modal.js"></script>
-<script src="/bg/js/settings/modal-controller.js"></script>
-<script src="/bg/js/settings/scan-inputs-simple-controller.js"></script>
-<script src="/bg/js/settings/settings-controller.js"></script>
-<script src="/bg/js/settings/status-footer.js"></script>
-
-<script src="/bg/js/settings2/settings-display-controller.js"></script>
-
-<script src="/bg/js/welcome-main.js"></script>
-
-</body>
-</html>