* Add support for an idle timeout when downloading audio
* Update eslint rules
* Pass idleTimeout to the downloader from DisplayAnki
* Add anki.downloadTimeout setting
* Update tests
* Assign _audioDownloadIdleTimeout using settings
* Show info about cancelled downloads
* Handle Firefox bug
* Improve audio errors
* Refactor
* Move functions to RequestBuilder
* Remove unnecessary return
* Move touch start input filtering
* Refactor
* Add scanOnTouchPress
* Add preventPenScrolling
* Rename scanOnPenPress to scanOnPenMove
* Rename scanOnPenRelease to scanOnPenReleaseHover
* Simplify
* Refactor _searchAtFromPen early exit
* Merge _penPointerPressed and _penPointerReleased into a single variable
* Add more options
* Simplify pen pointer coordinates
* Implement scanOnPenPress and scanOnPenRelease
* Implement scanOnTouchRelease
* Fix tests
* Don't search on touch cancel
* Cancel touch if the touch action is used for scrolling or other gestures
* Fix incorrect scroll prevention options being used
* Organize options
* Fix typos
* Update material.css to support password fields
* Support password
* Add "apiKey" setting
* Use apiKey
* Update options if API key changes
* Update tests
* Add AnkiConnect.guiEditNote
* Update _onApiNoteView to first try guiEditNote
* Add setting
* Update noteView API
* Use setting
* Return which mode was used
* Update DisplayGenerator
* Handle errors in DisplayAnki
* Update docs
* Add isErrorUnsupportedAction function
* Add an allowFallback option to noteView
* Disambiguate
* Simplify now that preferredMode isn't used
* Update settings info
* Implement test buttons
* Update styles
* Update status visibility
* Wrap layout
* Update description
* Update date
* Pass JapaneseUtil instance to StructuredContentGenerator
* Move body of createStructuredContent to an internal function
* Create _createStructuredContentGenericElement
* Wrap structured content in a <span>
* Change _createStructuredContent to _appendStructuredContent
* Add public appendStructuredContent function
* Add missing return
* Remove unused _createDocumentFragment
* Automatically assign lang=ja for content with Japanese characters
without an explicit language
* Add test
* Add support for structured content lists and `list-style-type` style
A full list of supported style types is documented here:
https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type
There's nothing in this code preventing a term bank from assigning,
for example, a `list-style-type` style to a `div` element, but it
doesn't seem like browsers will complain about things like that.
* Add support for `lang` attribute in structured content
Support added for the following node types:
"ruby", "rt", "rp", "table", "thead", "tbody", "tfoot", "tr", "td",
"th", "span", "div", "ol", "ul", "li", "a"
I couldn't get it to work for the alt-hover text on "img" tags.
Tests are included in the file
"test/data/dictionaries/valid-dictionary/term_bank_1.json"
* Add styles for structured content lists
* Add override rules for new structured-content list styles
see: https://github.com/FooSoft/yomichan/pull/2129
Co-authored-by: stephenmk <stephenmk@users.noreply.github.com>
* Update CSS to JSON converter to generalize the remove-property comment
* Fix navigation not being updated when _clearContent is run
* Add structured content schema for link tags
* Add test links
* Add external-link icon
* Pass Display instance to DisplayContentManager
* Update structured content generation
* Update link styles
* Make function private
* Update comments
* Refactor the content manager that is provided to StructuredContentGenerator in AnkiTemplateRenderer
* Update function to not be async, for API parity
* Update DictionaryDatabase._findMultiBulk's createResult callback signature
* Simplify _splitField use
* Update sequence
* Expose new fields 'matchType' and 'matchSource' as part of term data
* Expose matchType and matchSource as part of TermSource
* Update sourceTermExactMatchCount calculation
* Update test data
* Expose matchType and matchSource info in HTML attributes
* Add primaryMatchTypes attribute
* Restore support for string frequency values
* Add support for {value, displayValue} frequencies
* Update test data
* Improve number parsing of string frequencies
* Improve reading detection
* Expose a displayValue property for frequency information
* Update docs
* Expose displayValue to Anki note data
* Fix translator
* Update display generation
* Update test data
* Update counts
* Add support for structured-content data attributes
* Assign dataset properties
* Don't remove data-sc attributes
* Use helper functions
* Update test data
* Add accessibility option for forcing Google Docs HTML-based rendering
* Update settings
* Send a documentStart message at document start
* Add accessibility script for Google Docs
* Set up accessibility
* Update tests
* Rename param for consistency
* Move media loading functionality into DictionaryImporterMediaLoader
* Create test class for media loading
* Remove unnecessary Blob/Image/URL functionality
* Update anki pronunciation templates
* Expose nasalPositions/devoicePositions
* Update templates to support nasal/devoice positions
* Update test data
* Rename field
* Set up pronunication components
* Fix documentation
* Rename function
* Update test dependencies
* Fix constructor
* Log errors
* Add pronunciation helper
* Add styleApplier argument to _getHtml/_normalizeHtml
* Use getAttribute for 'class' to support namespaced elements (e.g. svg)
* Update format name
* Add optional tag
* Update docs