Commit Graph

3821 Commits

Author SHA1 Message Date
toasted-nutbread
6cf01555e7
Make accessibility settings non-advanced (#1972) 2021-09-30 19:41:26 -04:00
toasted-nutbread
55a7e7f9a8
Hotkey dictionary navigation fix (#1970)
* Add getRect function to ScrollElement

* Update _focusEntry to take a definition index

* Update behaviour of (next|previous)EntryDifferentDictionary
2021-09-30 19:31:45 -04:00
toasted-nutbread
b0f6c41f5d
Search query offset value (#1968)
* Add type property to TextSource* classes

* Use type property rather than instanceof

* Expose a sentence offset value

* Use offset added to URL

* Improve fallback sentence for Anki note context
2021-09-27 19:07:28 -04:00
toasted-nutbread
b784e5b11a
Katakana to hiragana conversion options (#1965)
* Refactor convertKatakanaToHiragana

* Add keepProlongedSoundMarks option

* Test keepProlongedSoundMarks option

* Refactor

* Add keepProlongedSoundMarks option to hiragana handlebars helper

* Update documentation
2021-09-27 18:19:53 -04:00
toasted-nutbread
729abbf561
Remove display query post process (#1967)
* Remove search query post-processing

* Remove _rawQuery, as it is redundant with _query
2021-09-26 22:14:52 -04:00
toasted-nutbread
ba267a545c
Rename dictionary import steps (#1966) 2021-09-26 20:08:16 -04:00
toasted-nutbread
247c929bba
Update document-start.js to only run for docs.google.com (#1964)
* Update document-start.js to only run for docs.google.com

* Update manifest
2021-09-26 18:23:57 -04:00
toasted-nutbread
c364714c81
Fix hotkey input field conflict (#1963)
* Move comment

* Add DocumentUtil.isInputElement

* Use DocumentUtil.isInputElement

* Fix simple hotkeys (shift or no modifier) preventing text field input

* Improve input detection

* Validate key is an input character before blocking hotkey

* Simplify

* Fix incorrect property
2021-09-26 18:14:00 -04:00
toasted-nutbread
d739ccd63f
Fix japanese codepoint range issues (#1960)
* Add CJK_COMPATIBILITY_IDEOGRAPHS_RANGE

* Rename CJK_UNIFIED_IDEOGRAPHS_RANGES => CJK_IDEOGRAPH_RANGES

* Simplify isKana check

* Update tests
2021-09-26 13:29:55 -04:00
toasted-nutbread
25fe3ba514
Revert term/reading string normalization due to undesirable changes (#1959) 2021-09-26 13:29:50 -04:00
toasted-nutbread
076170cc38
Fix regexMatch and regexReplace handlebars helper functions (#1958) 2021-09-26 12:15:00 -04:00
toasted-nutbread
14b2a9be87
npm update (#1957) 2021-09-26 11:08:32 -04:00
toasted-nutbread
6694a9d9c3
Enable frequency dictionaries to specify the frequency mode (#1944) 2021-09-26 11:08:25 -04:00
toasted-nutbread
c15683d206
Ensure frequency values are always numbers (#1943) 2021-09-26 11:08:21 -04:00
toasted-nutbread
9899727d7d
Frequency dictionary sort (#1938)
* Add sortDictionary/sortDictionaryOrder options

* Update options

* Add API.getTermFrequencies

* Add settings

* Implement frequency dictionary sorting

* Update test

* Update test data

* Fix handling of undefined rank-based frequencies
2021-09-26 11:08:16 -04:00
toasted-nutbread
88e71f8223
Add data-is-primary attribute to headwords (#1946) 2021-09-11 12:51:51 -04:00
toasted-nutbread
6661933d47
Display button updates (#1945)
* Use span rather than div for button badges

* Update action button icons

* Rename class

* Update current entry indicator
2021-09-10 20:48:03 -04:00
toasted-nutbread
dfddf3792e
Fix redundant secondary term lookups (#1942) 2021-09-09 23:29:41 -04:00
toasted-nutbread
7883d39496
Normalize terms and readings during import (#1941) 2021-09-09 23:25:24 -04:00
toasted-nutbread
069ca1a97b
Anki field templates suggestions (#1940)
* Remove unused

* Bold the suggested default field value
2021-09-08 20:12:26 -04:00
toasted-nutbread
6b566e0329
Rename _onDocumentStart => _onApiDocumentStart for consistency (#1939) 2021-09-08 14:49:00 -04:00
toasted-nutbread
9b86b5a56e
Update dictionary validation script (#1937) 2021-09-08 14:36:46 -04:00
toasted-nutbread
ac12b50939
Dictionary import count details (#1935)
* Store count information when importing a dictionary

* Add importDate

* Update property ordering

* Update tests

* Update importDate
2021-09-07 11:12:58 -04:00
toasted-nutbread
c91831a817
Anki template regex helper updates (#1934)
* Update regexReplace and regexMatch to support content arguments

* Update documentation
2021-09-05 22:59:46 -04:00
toasted-nutbread
b988417031
Fix incorrect index being used for headword removal (#1933) 2021-09-05 21:07:23 -04:00
toasted-nutbread
97a80276f6
Database readwrite transaction updates (#1932)
* Add _readWriteTransaction helper

* Improve deleteDictionary order

* Make onProgress event optional

* Simplify progress rate parameter
2021-09-05 20:00:08 -04:00
toasted-nutbread
f68ad1f843
Structured content data (#1930)
* Add support for structured-content data attributes

* Assign dataset properties

* Don't remove data-sc attributes

* Use helper functions

* Update test data
2021-09-04 12:43:56 -04:00
toasted-nutbread
eb457caea9
Fix repeated note IDs shown on the "View Note" button (#1927) 2021-09-03 22:42:27 -04:00
toasted-nutbread
0331374241
Dictionary media import improvements (#1926)
* Add base64ToArrayBuffer to StringUtil

* Remove unnecessary media-util.js import

* Run async requirements in serial rather than parallel

* Update API.getMedia handler to convert ArrayBuffer content to base64

* Rename getImageResolution to getImageDetails

* Change parameter order of getImageDetails

* Pre-process and store media as an ArrayBuffer

* Remove MediaUtil.createBlobFromBase64Content

* Fix Anki media injection
2021-09-03 22:33:58 -04:00
toasted-nutbread
764d59df13 Update version 2021-08-31 21:49:57 -04:00
toasted-nutbread
1599ec1f15
Fix dictionary import total progress (#1921)
* Fix incorrect total count for final step of dictionary import

* Update tests to validate progress args
2021-08-31 21:42:18 -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
f565cc5a47
Improve accessibility of links without href (#1915) 2021-08-28 14:45:25 -04:00
toasted-nutbread
87fbb3c01c
Dictionary worker updates (#1914)
* Add support for running getDictionaryCounts via DictionaryWorker

* Run dictionary integrity checks on a separate thread

* Remove api.getDictionaryCounts
2021-08-28 14:30:50 -04:00
toasted-nutbread
74709296e5
Dictionary database worker refactoring (#1913)
* Rename DictionaryWorker => DictionaryWorkerHandler

* Rename var

* Rename file

* Simplify

* Rename DictionaryDatabaseModifier => DictionaryWorker

* Rename dictionary-database-modifier.js => dictionary-worker.js
2021-08-28 14:22:16 -04:00
toasted-nutbread
93f193c89e
Fix incorrect dictionary name ordering being used for counts (#1912) 2021-08-28 13:47:03 -04:00
toasted-nutbread
58744ed013
Fix incorrect katakana template docs (#1909) 2021-08-25 22:24:46 -04:00
toasted-nutbread
dfd52e1ecd
Hiragana & katakana helpers (#1908)
* Add hiragana and katakana template helpers

* Update documentation

* Fix documentation
2021-08-25 21:58:51 -04:00
toasted-nutbread
dd10dd601e
Replace ... with … (#1902) 2021-08-20 20:56:33 -04:00
toasted-nutbread
9bc708bb8d
Fix border radius on the outline-item style (#1901) 2021-08-20 18:20:56 -04:00
toasted-nutbread
e56734fc88
Input styles updates (#1900)
* Rename class

* Update styles

* Use input-group class

* Update styles

* Update input line height

* Update border styles

* Update styles

* Update line height

* Update styles

* Update line height

* Update line height

* Update outline item style
2021-08-20 18:13:56 -04:00
toasted-nutbread
388328b85b
Update browser bugs (#1899)
* Strike chrome bug, since the issue was due to API misuse

* Add info about content scripts not running on popup.open('', '...')
2021-08-16 21:06:14 -04:00
toasted-nutbread
b08bf103eb
Add connection icon (#1898) 2021-08-15 10:52:50 -04:00
toasted-nutbread
b6fc786f9a
Update dictionary importer progress event for step 6 to occur slightly earlier (#1897) 2021-08-14 18:16:30 -04:00
toasted-nutbread
4839503d54
Threaded dictionary delete (#1895)
* Generalize dictionary worker

* Add deleteDictionary functionality

* Update DictionaryController to use DictionaryDatabaseModifier

* Fix incorrect result handling
2021-08-14 12:41:58 -04:00
toasted-nutbread
3e350bd563
Dictionary worker refactor (#1894)
* Rename dictionary worker files

* Rename classes

* Rename file

* Rename class

* Generalize the _invoke method

* Rename 'import' to 'importDictionary'

* Improve DictionaryImporterMediaLoader usage

* Refactor message handler

* Generalize onProgress event
2021-08-14 11:46:26 -04:00
toasted-nutbread
cd78d56fee
Database improvements to data persistency (#1893)
* Fix function check

* Rename arguments of getAll, getAllKeys, and their private functions

* Simplify bulkAdd

* Simplify delete

* Simplify bulkDelete

* Remove persistData
2021-08-13 18:35:31 -04:00
toasted-nutbread
9facacfb23
Update CssStyleApplier.prepare to passively fail if it can't read the file (#1891) 2021-08-11 20:14:19 -04:00