From 0c29b10a711f2ff9978ec9898867eb0aae88298d Mon Sep 17 00:00:00 2001 From: Kuuuube <61125188+Kuuuube@users.noreply.github.com> Date: Thu, 25 Apr 2024 08:38:46 -0400 Subject: Add option to disable furigana and reading in Term display style (#862) * Add option to disable furigana and reading in `Term display style` * Also hide search reading --- ext/css/display.css | 6 +++++- ext/data/schemas/options-schema.json | 2 +- ext/settings.html | 1 + types/ext/settings.d.ts | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ext/css/display.css b/ext/css/display.css index a148af13..90f6a1e6 100644 --- a/ext/css/display.css +++ b/ext/css/display.css @@ -947,7 +947,11 @@ button.action-button:active { :root[data-term-display-mode=term-and-reading] .headword[data-reading-is-same=true] .headword-reading-outer { display: none; } -:root[data-term-display-mode=term-and-reading] .headword-term>ruby>rt { +:root[data-term-display-mode=term-and-reading] .headword-term>ruby>rt, +:root[data-term-display-mode=term-only] .headword-term>ruby>rt { + display: none; +} +:root[data-term-display-mode=term-only] .query-parser-term>ruby>rt { display: none; } diff --git a/ext/data/schemas/options-schema.json b/ext/data/schemas/options-schema.json index b3f68881..0cb6db0a 100644 --- a/ext/data/schemas/options-schema.json +++ b/ext/data/schemas/options-schema.json @@ -290,7 +290,7 @@ }, "termDisplayMode": { "type": "string", - "enum": ["ruby", "ruby-and-reading", "term-and-reading"], + "enum": ["ruby", "ruby-and-reading", "term-and-reading", "term-only"], "default": "ruby" }, "sortFrequencyDictionary": { diff --git a/ext/settings.html b/ext/settings.html index 3c94b95e..68113d21 100644 --- a/ext/settings.html +++ b/ext/settings.html @@ -851,6 +851,7 @@ + diff --git a/types/ext/settings.d.ts b/types/ext/settings.d.ts index 4e3b185a..1fce0f59 100644 --- a/types/ext/settings.d.ts +++ b/types/ext/settings.d.ts @@ -373,7 +373,7 @@ export type PopupActionBarLocation = 'left' | 'right' | 'top' | 'bottom'; export type FrequencyDisplayMode = 'tags' | 'tags-grouped' | 'split-tags' | 'split-tags-grouped' | 'inline-list' | 'list'; -export type TermDisplayMode = 'ruby' | 'ruby-and-reading' | 'term-and-reading'; +export type TermDisplayMode = 'ruby' | 'ruby-and-reading' | 'term-and-reading' | 'term-only'; export type SortFrequencyDictionaryOrder = 'ascending' | 'descending'; -- cgit v1.2.3