Commit Graph

122 Commits

Author SHA1 Message Date
toasted-nutbread
eb457caea9
Fix repeated note IDs shown on the "View Note" button (#1927) 2021-09-03 22:42:27 -04:00
toasted-nutbread
02194fcb9f
Add support for structured content margins (#1920) 2021-08-31 21:08:30 -04:00
toasted-nutbread
ce1a862df4
Fix empty sentence on some search page URLs (#1919) 2021-08-31 20:45:29 -04:00
toasted-nutbread
3e7f3af63c
Fix history replacement issue (#1917)
* Remove unused "history" field of event details

* Change setContent history parameter to historyMode
2021-08-30 21:55:08 -04:00
toasted-nutbread
916189f402
Fix auto-play not working on the search page (#1882) 2021-08-10 19:23:05 -04:00
toasted-nutbread
edb0aaf6b4
Improve audio auto play cancellation (#1873)
* Cancel automatic audio playback when hiding the popup

* Don't play audio if the popup is hidden
2021-08-02 19:25:10 -04:00
toasted-nutbread
b0596c8a3c
Rename pitchAccent in source code (#1852)
* Rename pitchAccentPosition to pitchAccentDownstepPosition

* Rename function

* Rename

* Rename

* pitches => pronunciations
2021-07-26 19:45:30 -04:00
toasted-nutbread
a9710b8acf
Rename CSS class names "pitch-accent" to "pronunciation" (#1850)
* pitch-accents => pronunciations

* Update dataset property names

* pitch-accent-dictionary => pronunciation-dictionary

* Update styles

* Update template name

* Update attributes
2021-07-25 18:16:07 -04:00
toasted-nutbread
73f06a3fa0
Fix definition image aspect ratio issue (#1847)
* Fix incorrect aspect ratio

* Update test data
2021-07-22 18:11:46 -04:00
toasted-nutbread
637d4a2087
Pronunciation template helper (#1840)
* 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
2021-07-18 13:43:11 -04:00
toasted-nutbread
fafa746a63
Sandbox script folders (#1837)
* Move scripts

* Update paths

* Fix ordering

* Simplify eslint rules
2021-07-17 17:10:25 -04:00
toasted-nutbread
3e938f1a1f
Display pronunciation refactor (#1835)
* Simplify svg and container styles

* Rename pitch-accent-details to pitch-accent-graph-container

* Rename pitch-accent-graph* to pronunciation-graph*

* Remove unused template

* Omit quotes

* Rename pitch-accent-character to pronunciation-mora

* Simplify names

* Replace pronunciation-mora-inner with pronunciation-character

* Improve grouping of nasal characters

* Simplify character replacement

* Replace pseudo-elements with real elements

* Use an element rather than a fragment

* Rename functions

* Add wrapper

* Rename pitch-accent-characters to pronunciation-text-container

* Update test data

* Update downstep notation generation

* Rename pitch-accent-position to pronunciation-downstep-notation-container

* Space

* Wrap pronunciations in a container node

* Update preview

* Embed pitch accent styles directly
2021-07-17 14:44:36 -04:00
toasted-nutbread
a933cfdc07
Pronunciation nasal improvement (#1834)
* Organize

* Add utility to get diacritic information about a character

* Show mora without diacritic

* Add a hidden handakuten for copy-paste purposes
2021-07-17 12:20:11 -04:00
toasted-nutbread
4a2b824371
Display pronunciation separation (#1833)
* Create PronunciationGenerator

* Update DisplayGenerator

* Update templates

* Move pronunciation styles to a separate file

* Simplify pitch-accents-preview.html
2021-07-17 10:26:20 -04:00
toasted-nutbread
41fc76d6fd
Devoice and nasal pronunciation info (#1832)
* Update schema to support information about nasal and devoiced mora

* Expose nasalPositions and devoicePositions in dictionary entry data

* Expose nasalPositions, devoicePositions in grouped pitch info

* Update display generator

* Update test dictionary data

* Update test data
2021-07-15 22:39:33 -04:00
toasted-nutbread
25d74140ce
Multi view note (#1829)
* Add support for a menu to view multiple note IDs

* Show a + badge when there are multiple notes available

* Organize
2021-07-14 22:37:18 -04:00
toasted-nutbread
d058237ba7
Duplicate scope check all models (#1810)
* Add duplicateScopeCheckAllModels option to createNote

* Add duplicateScopeCheckAllModels option

* Add setting
2021-07-13 20:29:53 -04:00
toasted-nutbread
d897fb553d
Improve error when card has missing content (#1818) 2021-07-09 20:26:20 -04:00
toasted-nutbread
8c68fa4d94
Anki text furigana parsing and {sentence-furigana} marker (#1814)
* Add support for textFurigana media

* Add readingMode parameter

* Implement readingMode

* Add {sentence-furigana} marker

* Fallback to sentence if furigana isn't available

* Update test data
2021-07-09 17:48:27 -04:00
toasted-nutbread
0d16709547
JapaneseUtil updates (#1813)
* Rename test file

* Use shorthand

* Add support checking functions

* Remove convertReading from JapaneseUtil
2021-07-09 17:31:16 -04:00
toasted-nutbread
24ec22b2e1
Text parse updates (#1811)
* Expose more settings to QueryParser

* Rename textParse to parseText

* Refactor

* Convert reading inside QueryParser rather than Backend

* Remove use of readingMode from backend

* Rename

* Update parseText args

* Simplify

* Update results

* Move use of optionsContext

* Run mecab and internal parser in parallel

* Added "dictionary-reading" reading mode

* Update romaji conversion case
2021-07-09 16:05:57 -04:00
toasted-nutbread
8d1596cdf8
Fix incorrect resultOutputMode (#1804) 2021-07-06 21:49:57 -04:00
toasted-nutbread
e88d63fc6d
Template renderer media updates (#1802)
* Add TemplateRendererMediaProvider to abstract media-related functionality

* Update representation of injected media

* Update templates

* Update upgrade file

* Update tests

* Update test data

* Force media to be an object

* Update test data
2021-07-06 19:43:53 -04:00
toasted-nutbread
54808d4a2d
Pass requirements to note generation (#1800)
* Update structure

* Pass requirements to _createNote

* Show an error for requirements that weren't fulfilled
2021-07-05 16:59:30 -04:00
toasted-nutbread
da13a2ebff
DisplayAnki note requirements (#1799)
* Update how errors are collected from _formatField

* Expose requirements
2021-07-05 15:08:11 -04:00
toasted-nutbread
0491de12d4
Store anki note details (#1798)
* Update error handling of _areDictionaryEntriesAddable

* Store note details

* Remove promise after use

* Rename function

* Clear stored details

* Rename function

* Rename function
2021-07-05 14:41:11 -04:00
toasted-nutbread
b8478857aa
Refactor DisplayAnki.setupEntriesComplete params and implementation (#1794) 2021-07-04 11:11:05 -04:00
toasted-nutbread
468c923277
Update the note context object generation process to ensure consistency (#1792) 2021-07-03 20:09:22 -04:00
toasted-nutbread
ea47cb8248
DisplayAnki (#1791)
* Remove anki functionality from display

* Rename function

* Display API updates

* Use DisplayAnki

* TODO
2021-07-03 19:32:11 -04:00
toasted-nutbread
f7d177e6d0
Refactor createNote (#1789)
* Update createNote to return a wrapper object

* Update how createNote creates errors
2021-07-03 11:30:48 -04:00
toasted-nutbread
ace46503be
Make Display.authenticateMessageData private (#1780) 2021-06-29 22:17:14 -04:00
toasted-nutbread
1f1a958a71
Update CSS rules for images (#1777) 2021-06-28 22:12:17 -04:00
toasted-nutbread
9f3d267e24
Fix incorrect aspect ratio of structured-content images (#1776) 2021-06-28 21:46:54 -04:00
toasted-nutbread
24ef820ba8
Update structured content CSS styles (#1770) 2021-06-27 15:01:35 -04:00
toasted-nutbread
e5284988e2
Structured content generation updates (#1760)
* Simplify _createElement, fix misuse of classList

* Don't use templates to generate image content

* Omit templates
2021-06-26 15:49:23 -04:00
toasted-nutbread
f389b3c232
Fix missing error logging when logging debug info (#1758) 2021-06-26 15:27:33 -04:00
toasted-nutbread
8d1d428ed4
Move structured-content generation code into a separate file (#1757) 2021-06-26 14:40:37 -04:00
toasted-nutbread
435af3a485
Improve what info is logged when debugging a definition (#1756) 2021-06-26 14:10:18 -04:00
toasted-nutbread
5756885fa9
Structured content updates (#1753)
* Update schema

* Update content generation

* Update styles

* Update test data

* Update style names
2021-06-25 17:24:29 -04:00
toasted-nutbread
cf70b3de64
Fix search input focus not working properly (#1752) 2021-06-25 16:49:47 -04:00
toasted-nutbread
7ae964c830
Structured content updates (#1733)
* Add support for imageRendering

* Make crisp-edges appearance on Firefox more similar to Chrome

* Refactor

* Add background option

* Move data-image-rendering attribute

* Restructure

* Organize

* Add support for appearance

* Update test dictionary

* Update tests
2021-06-06 14:47:48 -04:00
toasted-nutbread
5bf82a5b81
Primary audio fixes (#1719)
* Fix case when subIndex is not assigned

* Fix incorrect assignment of primary card audio

* Improve opacity style

* Improve styles for :focus-visible
2021-05-30 13:29:55 -04:00
toasted-nutbread
cca01e85a3
Improve multiple audio sources (#1718)
* Add url/voice options to audio sources

* Add help for TTS

* Remove old settings

* Update tests

* Update use of audio source URL

* Improve labels for sources with the same type
2021-05-30 12:41:19 -04:00
toasted-nutbread
efd35de67f
Refactor display audio options (#1717)
* Update how options are updated and stored in DisplayAudio

* Add source list

* Improve menus for custom json

* Clear cache after options update

* Move function

* Update public API

* Simplify playing audio from a specific source

* Simplify audio list

* Refactor audio source usage

* Refactoring

* Refactor argument names

* Fix incorrect source usage

* Remove unused

* Remove return value

* Simplify details

* Simplify Anki card audio details

* Update the data that is passed to AudioDownloader

* Simplify schema handling

* Remove unnecessary details
2021-05-30 12:15:07 -04:00
toasted-nutbread
0232325f96
Refactor json audio source (#1711)
* Move sources to the end of audio options object

* Add custom-json audio source type

* Add support for downloading custom-json

* Remove customSourceType
2021-05-26 20:38:15 -04:00
toasted-nutbread
24d43c123d
Fix incorrect selector causing invalid headword index to be used (#1705) 2021-05-23 13:20:38 -04:00
toasted-nutbread
be23acf499
Structured content image size units (#1692)
* Add support for sizeUnits on image content

* Update test data
2021-05-20 19:33:08 -04:00
toasted-nutbread
6184bcb812
Selection clear improvements (#1690)
* Update selection clear process

* Clean up old clearSelection API

* Update clear order

* Add clear event handling
2021-05-19 20:09:37 -04:00
toasted-nutbread
eddd028864
Add support for definitions with structured content (#1689)
* Add structured content to schema

* Add support for generating custom content

* Update importer

* Update test data

* Add verticalAlign property
2021-05-19 18:24:50 -04:00
toasted-nutbread
f3cf4d10c7
Dictionary image display refactoring (#1687)
* Generalize image definition generation

* Enable optional aspect ratio

* Move styles

* Update styles

* Add more options for collapsing images

* Add image options for collapsing

* Improve layout for images that are collapsed
2021-05-18 17:41:27 -04:00