aboutsummaryrefslogtreecommitdiff
path: root/ext/fg
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-11-25 23:22:05 -0500
committerGitHub <noreply@github.com>2020-11-25 23:22:05 -0500
commit92e9f69c8069644c544301a51fbbd351e799e99d (patch)
tree621bea652f78ab9e5b6850512ababeece243f908 /ext/fg
parentc6c4631817247c44f788b1ffa2bc1d9f644802eb (diff)
Popup style updates (#1066)
* Replace compactGlossaries option with new glossaryLayoutMode option * Update attributes * Update attributes * Update color definitions * Fix default theme scrollbar
Diffstat (limited to 'ext/fg')
-rw-r--r--ext/fg/css/client.css4
-rw-r--r--ext/fg/float.html2
-rw-r--r--ext/fg/js/popup.js6
3 files changed, 7 insertions, 5 deletions
diff --git a/ext/fg/css/client.css b/ext/fg/css/client.css
index 227f5030..0957c758 100644
--- a/ext/fg/css/client.css
+++ b/ext/fg/css/client.css
@@ -28,8 +28,8 @@ iframe.yomichan-float {
box-sizing: border-box;
}
-iframe.yomichan-float[data-yomichan-theme=dark],
-iframe.yomichan-float[data-yomichan-theme=auto][data-yomichan-site-color=dark] {
+iframe.yomichan-float[data-outer-theme=dark],
+iframe.yomichan-float[data-outer-theme=auto][data-site-color=dark] {
background-color: #1e1e1e;
border: 1px solid #666;
box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
diff --git a/ext/fg/float.html b/ext/fg/float.html
index 36aedb7a..5874f44d 100644
--- a/ext/fg/float.html
+++ b/ext/fg/float.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<html lang="en" data-yomichan-page="float">
+<html lang="en" data-page-type="popup">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
diff --git a/ext/fg/js/popup.js b/ext/fg/js/popup.js
index 00afb773..b3af3d6f 100644
--- a/ext/fg/js/popup.js
+++ b/ext/fg/js/popup.js
@@ -186,8 +186,10 @@ class Popup extends EventDispatcher {
}
updateTheme() {
- this._frame.dataset.yomichanTheme = this._options.general.popupOuterTheme;
- this._frame.dataset.yomichanSiteColor = this._getSiteColor();
+ const {popupTheme, popupOuterTheme} = this._options.general;
+ this._frame.dataset.theme = popupTheme;
+ this._frame.dataset.outerTheme = popupOuterTheme;
+ this._frame.dataset.siteColor = this._getSiteColor();
}
async setCustomOuterCss(css, useWebExtensionApi) {