aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-12-22 18:18:30 -0500
committerGitHub <noreply@github.com>2020-12-22 18:18:30 -0500
commitd0adf2ca156f92c4f62e8ee5082f26e21e4fde70 (patch)
tree60e0bdfd26d09e3f195ef0417e13a69b00aa0920 /ext
parentbb902c76e8f6b09f2d994091715ae31027354cd6 (diff)
Add window settings (#1160)
* Add window icon * Move some options to a new "Window" section
Diffstat (limited to 'ext')
-rw-r--r--ext/bg/css/settings2.css1
-rw-r--r--ext/bg/settings2.html134
-rw-r--r--ext/mixed/img/window.svg1
3 files changed, 73 insertions, 63 deletions
diff --git a/ext/bg/css/settings2.css b/ext/bg/css/settings2.css
index 765a9c55..80217d9b 100644
--- a/ext/bg/css/settings2.css
+++ b/ext/bg/css/settings2.css
@@ -317,6 +317,7 @@ h3 {
.icon[data-icon=magnifying-glass] { --icon-image: url(/mixed/img/magnifying-glass.svg); }
.icon[data-icon=collapse] { --icon-image: url(/mixed/img/collapse.svg); }
.icon[data-icon=expand] { --icon-image: url(/mixed/img/expand.svg); }
+.icon[data-icon=window] { --icon-image: url(/mixed/img/window.svg); }
/* Content layout */
diff --git a/ext/bg/settings2.html b/ext/bg/settings2.html
index 2f448370..850b6794 100644
--- a/ext/bg/settings2.html
+++ b/ext/bg/settings2.html
@@ -28,6 +28,7 @@
<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"><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="#!translation" class="outline-item"><span class="outline-item-left"><span class="outline-item-icon icon" data-icon="translation"></span></span><span class="outline-item-label">Translation</span></a>
@@ -525,69 +526,6 @@
</p>
</div>
</div>
- <div class="settings-item advanced-only">
- <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 advanced-only">
- <div class="settings-item-inner">
- <div class="settings-item-left">
- <div class="settings-item-label">
- Open a native browser window when copying Japanese text
- <a class="more-toggle more-only" data-parent-distance="4">(?)</a>
- </div>
- </div>
- <div class="settings-item-right">
- <label class="toggle"><input type="checkbox" id="enable-clipboard-popups"><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 Japanese text is copied to the clipboard, a browser window popup searching for the clipboard
- text will be opened.
- 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 polled for new text.
- </p>
- <p>
- Alternatively, this feature can be enabled only on the search page, and clipboard contents polling will
- only be performed when the search page is already open.
- </p>
- <p>
- <a class="more-toggle" data-parent-distance="3">Less&hellip;</a>
- </p>
- </div>
- </div>
- <div class="settings-item advanced-only"><div class="settings-item-inner">
- <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 text characters used when searching clipboard content.</div>
- </div>
- <div class="settings-item-right">
- <input type="number" min="0" step="1" data-setting="general.maximumClipboardSearchLength">
- </div>
- </div></div>
</div>
<div class="heading-container">
@@ -932,6 +870,76 @@
</div>
<div class="heading-container">
+ <div class="heading-container-icon"><span class="icon" data-icon="window"></span></div>
+ <div class="heading-container-left"><h2 id="window">Window</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">
+ 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">
+ <div class="settings-item-left">
+ <div class="settings-item-label">
+ Open a native browser window when copying Japanese text
+ <a class="more-toggle more-only" data-parent-distance="4">(?)</a>
+ </div>
+ </div>
+ <div class="settings-item-right">
+ <label class="toggle"><input type="checkbox" id="enable-clipboard-popups"><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 Japanese text is copied to the clipboard, a browser window popup searching for the clipboard
+ text will be opened.
+ 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 polled for new text.
+ </p>
+ <p>
+ Alternatively, this feature can be enabled only on the search page, and clipboard contents polling will
+ only be performed when the search page is already open.
+ </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">Maximum clipboard text search length</div>
+ <div class="settings-item-description">Limit the number of text characters used when searching clipboard content.</div>
+ </div>
+ <div class="settings-item-right">
+ <input type="number" min="0" step="1" data-setting="general.maximumClipboardSearchLength">
+ </div>
+ </div></div>
+ </div>
+
+ <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">Audio</h2></div>
</div>
diff --git a/ext/mixed/img/window.svg b/ext/mixed/img/window.svg
new file mode 100644
index 00000000..d0d3b0fb
--- /dev/null
+++ b/ext/mixed/img/window.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M1 3v10h14V3H1zm1 1h5v1H2V4zm9 0h1v1h-1V4zm2 0h1v1h-1V4zM2 6h12v6H2V6zm1 1.5v1h10v-1H3zm0 2v1h8v-1H3z"/></svg> \ No newline at end of file