diff options
author | StefanVukovic99 <stefanvukovic44@gmail.com> | 2024-06-20 19:27:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-20 17:27:02 +0000 |
commit | d2c930a94d6e445053bcb5e5bb629851165425fc (patch) | |
tree | 94ff7034e7d3ab36ed663f353aeb5486bd294d1c /ext/js/data/options-util.js | |
parent | 1a866b3997310a04fc146b91eb47a59a3f049589 (diff) |
support css file in dictionaries (#1080)
* get styles in db
* get styles in settings
* use styles
* fix test
* scope
* fix comma separated
* escape dict name in css selector
* g regex
* get styles in anki
* fix tests
* more specificity
* whitespace
* test importing
* test handlebars
* add styles to glossary-first
Diffstat (limited to 'ext/js/data/options-util.js')
-rw-r--r-- | ext/js/data/options-util.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js index 64b2e3bc..8af299d8 100644 --- a/ext/js/data/options-util.js +++ b/ext/js/data/options-util.js @@ -548,6 +548,7 @@ export class OptionsUtil { this._updateVersion38, this._updateVersion39, this._updateVersion40, + this._updateVersion41, ]; /* eslint-enable @typescript-eslint/unbound-method */ if (typeof targetVersion === 'number' && targetVersion < result.length) { @@ -1340,6 +1341,14 @@ export class OptionsUtil { } /** + * - Updated `glossary` handlebars to support dictionary css. + * @type {import('options-util').UpdateFunction} + */ + async _updateVersion41(options) { + await this._applyAnkiFieldTemplatesPatch(options, '/data/templates/anki-field-templates-upgrade-v41.handlebars'); + } + + /** * @param {string} url * @returns {Promise<chrome.tabs.Tab>} */ |