Commit Graph

66 Commits

Author SHA1 Message Date
toasted-nutbread
008809e0e7
Enforce language (#1344)
* Assign text content and a language

* Remove _appendMultilineText

* Assign lang for createTextNode content

* Add language attributes to HTML pages
2021-02-08 17:52:35 -05:00
toasted-nutbread
d0b8b605db
Add note errors (#1329)
* Update _addAnkiNote to track errors

* Change comparison

* Update anki note adding to show errors

* Fix template

* Show errors when Anki card creation behaves unexpectedly

* Update some errors related to anki media injection

* Update addAnkiNote error handling

* Improve Anki errors

* Simplify error messages related to template rendering
2021-01-30 12:33:29 -05:00
toasted-nutbread
a81787c55b
Remove the dictionary tag from the definitionTags (#1324)
* Remove dictionary tag from term definitionTags and kanji tags

* Update test data

* Update templates

* Update tests

* Update information
2021-01-28 21:33:30 -05:00
toasted-nutbread
ef577b8875
Audio button menu (#1302)
* Fix popup menus not stoping events

* Ensure non-stale use of buttons

* Enable popup menus on the popup/search pages

* Add audio menu
2021-01-23 21:13:01 -05:00
toasted-nutbread
3c51bf2a0b
Fix DisplayGenerator not working on pitch-accents-preview.html (#1276) 2021-01-19 20:48:10 -05:00
toasted-nutbread
cbc5ab5696
Hotkey help controller (#1272)
* Create HotkeyHelpController

* Expose getAllTemplates

* Update hotkeys on the context page

* Update hotkeys on the display pages

* Fix display issue where a hotkey used to be defined but no longer is
2021-01-18 15:23:49 -05:00
toasted-nutbread
5b58a9aeef
Update term tags display and fix a layout issue (#1208)
* Fix layout issue with term expression display

* Update display of term tags

* Update tag notification to include disambiguation information
2021-01-09 16:02:03 -05:00
toasted-nutbread
06d23f59d8
Improve frequency display (#1209)
* Disable old frequencies

* Update layout

* Implement new frequency display

* Update count info
2021-01-09 10:41:17 -05:00
toasted-nutbread
a02891e52c
Update copyright year (#1194)
* Update copyright year

* Remove redundant Author info
2021-01-01 14:50:41 -05:00
toasted-nutbread
ad90bad057
Display profile panel (#1178)
* Expose Display.displayGenerator

* Update search when assigning options context

* Don't clear selection unless the popup changes

* Merge search styles

* Create panel for changing the profile
2020-12-29 23:38:44 -05:00
toasted-nutbread
bf34905012
Improve display tags (#1117)
* Update tag style

* Add styles/HTML for notifications

* Add DisplayNotification class

* Add support for tag notifications

* Simplify notification content
2020-12-18 09:43:54 -05:00
toasted-nutbread
95b225462a
Fix frequency tags (#1080)
* Rename term-frequency to tag-frequency

* Move tag styles

* Expand

* Use separate templates for terms vs kanji
2020-12-05 17:45:45 -05:00
toasted-nutbread
34451ebf71
JapaneseUtil normalization (#1076)
* Use JapaneseUtil as a class which is manually instantiated

* Use alias function for toKana
2020-11-29 13:09:02 -05:00
toasted-nutbread
94d63f4f87
Display style updates (#1072)
* Add variables for tag styles

* Add variable for compact list separator

* Improve compactness of pitch accents

* Improve kanji link styles

* Improve coloring for lists

* Move styles

* Update styles for lists

* Move conditional styles

* Simplify definitions

* Remove unused styles

* Cleanup

* Use strings for dataset properties

* Don't always collapse pitch accents
2020-11-27 15:22:06 -05:00
toasted-nutbread
02d9f7c736
Improve html templates (#1061)
* Add template pre-processing

* Remove whitespace

* Add labels

* Reuse tag template for search tags

* Add space
2020-11-24 19:06:29 -05:00
toasted-nutbread
0b00de3c0f
Frequency display improvements (#1060)
* Hide redundant frequencies

* Add dataset counters for unique expressions/readings

* Update frequency display to include disambiguations
2020-11-24 11:56:40 -05:00
toasted-nutbread
7b6a4c4e36
More display updates (#1050)
* Use grid for layout

* Add data-count attribute

* Fix scroll issues during focus

* Add index to entries

* Simplify audio playback
2020-11-21 21:17:39 -05:00
toasted-nutbread
50a1fbfb9f
Display updates (#1029)
* Simplify expression creation

* Add attribute indicating whether the reading is the same or not

* Update kanji debug info

* Remove some unnecessary null checks

* Simplify iterable check

* Update float and search HTML to be more consistent
2020-11-14 13:42:50 -05:00
toasted-nutbread
3edc35691b
Display updates (#1024)
* Update display generation to use new format assumptions

* Simplify how debug information is presented
2020-11-13 19:48:22 -05:00
toasted-nutbread
ec021964b7
Compact tags refactor (#1021)
* Update translator to flag redundant tags instead of remove

* Update how compact tags are shown in the popup

* Pass compactTags option to note builder

* Update options templates

* Add options upgrade

* Add options upgrade test
2020-11-12 20:34:11 -05:00
toasted-nutbread
255c8b724e
Pitch accents preview (#987)
* Add public preparePitchAccents function to DisplayGenerator

* Add pitch accents preview HTML, CSS, and JS
2020-11-03 22:30:20 -05:00
toasted-nutbread
a8ff38eec3
Fix display issues (#984)
* Remove unused function

* Update expresionMulti detection

* Simplify kanji early escape

* Simplify frequency/pitch data creation

* Update implementation of _buildTermMeta

* Update how pitch accents sources are collected

* Remove old _buildTermMeta
2020-11-01 21:24:35 -05:00
toasted-nutbread
cb1902eadd
Template handler update (#896)
* Rename TemplateHandler to HtmlTemplateCollection

* Rename _templateHandler to _templates

* Allow creation from both string and element

* Simplify setup of templates, don't throw errors on invalid ID
2020-10-07 20:47:44 -04:00
toasted-nutbread
1e839cd230
More display refactoring (#697)
* Remove some unnecessary _setQuery calls

* Add support for forcing the query parser to be visible or hidden

* Move _setEventListenersActive calls

* Remove URL for kanji links

* Refactor _setContentTermsOrKanji

* Move search query text assignment into Display

* Move title updates into Display

* Move popup close calls

* Prevent infinite loop of extension unload events
2020-08-01 16:22:00 -04:00
toasted-nutbread
736d3c892e
Dictionary data utility class (#698)
* Create utility class for helping format dictionary data

* Change format
2020-07-30 20:45:52 -04:00
toasted-nutbread
c61a87b152
API refactor (#532)
* Convert api.js into a class instance

* Use new api.* functions

* Fix missing binds

* Group functions with progress callbacks together

* Change style

* Fix API override not working
2020-05-24 13:30:40 -04:00
toasted-nutbread
ac603d54a3 Add support for displaying images 2020-04-18 21:32:35 -04:00
toasted-nutbread
82f8397000
Merge pull request #438 from toasted-nutbread/display-generator-refactoring
Display generator refactoring
2020-04-11 11:37:03 -04:00
4e5029f7ec Update license author field to broader to explicitly reflect that
Yomichan is an ongoing community project. It really does take a village,
and everyone who contributes code owns a part of it :)
2020-04-10 11:10:21 -07:00
toasted-nutbread
025b1f398b Simplify access to details fields in createTermEntry 2020-04-09 22:40:25 -04:00
toasted-nutbread
06183ec124 Update how termTags is passed to _createTermExpression 2020-04-09 22:40:25 -04:00
toasted-nutbread
bb37b74288 Rename "only" to "disambiguation" to match naming convention used for pitch accents 2020-04-09 22:40:25 -04:00
toasted-nutbread
6788bb31d2 Update _appendMultiple to not use a fallback 2020-04-09 22:40:25 -04:00
toasted-nutbread
f9bdf2c66f Organize 2020-04-09 22:40:25 -04:00
toasted-nutbread
9bbe35da68 Mark functions as private 2020-04-09 22:40:25 -04:00
toasted-nutbread
d7e4ff067e Remove statics 2020-04-09 22:40:25 -04:00
toasted-nutbread
75c5c7aabc Remove data-multi assignments 2020-04-09 22:40:25 -04:00
toasted-nutbread
1f84280ea0 Include readings in disambiguations 2020-03-29 11:27:13 -04:00
toasted-nutbread
a7da4416d7 Change names 2020-03-29 11:19:43 -04:00
toasted-nutbread
aa2a0c09f4 Update how pitch accent expressions are disambiguated 2020-03-28 14:52:44 -04:00
toasted-nutbread
2c4983da46 Update styles 2020-03-28 12:31:41 -04:00
toasted-nutbread
0d80fcdf86 Move Japanese utility functions out of display-generator.js 2020-03-28 10:47:02 -04:00
toasted-nutbread
803a464fb9 Add support for accent graph 2020-03-28 10:25:57 -04:00
toasted-nutbread
97a520cc15 Add support for displaying pitch accents 2020-03-28 10:25:57 -04:00
toasted-nutbread
2d7214ce60 Add metadata for unique expression count 2020-03-28 10:25:57 -04:00
toasted-nutbread
9e8a22b08a Add support for different sections for term content 2020-03-28 10:25:57 -04:00
toasted-nutbread
168bd72d0a Update _appendMultiple to support general iterables 2020-03-28 10:25:57 -04:00
toasted-nutbread
70284c62ee Replace DisplayGenerator._isCharacterKanji with jp.isCodePointKanji 2020-03-21 13:22:14 -04:00
toasted-nutbread
64fc0349a1 Update global declarations 2020-03-10 22:40:35 -04:00
toasted-nutbread
72219ba353 Replace charCodeAt and fromCharCode with codePointAt and fromCodePoint 2020-03-09 21:58:06 -04:00