Commit Graph

3325 Commits

Author SHA1 Message Date
toasted-nutbread
8e548a17eb
Dictionary database term source info (#2039)
* 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
2021-12-17 16:44:14 -05:00
toasted-nutbread
19ab9df6e4
Replace 'wildcard' parameter with 'matchType' (#2038) 2021-12-17 16:11:19 -05:00
toasted-nutbread
fced59a213
Fix source name not being used (#2036) 2021-12-14 22:03:34 -05:00
toasted-nutbread
ecbbfa39a2
Fix non-text <input> elements being included in scanning content (#2034) 2021-12-14 14:55:24 -05:00
toasted-nutbread
0356241362
Fix typo in comments (#2032) 2021-12-14 14:54:36 -05:00
toasted-nutbread
f2102ade4c
Add AccessibilityController class, which dynamically registers (#2024)
and unregisters the google-docs.js content script
2021-11-23 22:23:14 -05:00
toasted-nutbread
d454b52a18
Google Docs accessibility refactor (#2023)
* Skip urlRegex if it's used as a filter

* Add getRequiredContentScriptRegistrationPermissions function

* Add a reentrant check to google-docs.js

* Remove script node

* Move forceGoogleDocsHtmlRendering check into google-docs.js

* Replace document-start.js usage with google-docs.js

* Remove documentStart handling

* Add missing parameter descriptions
2021-11-23 22:08:30 -05:00
toasted-nutbread
ecc994a8bb
ScriptManager updates (#2022)
* Fix spacing

* Add more parameters to injectStylesheet

* Add more parameters to injectScript

* Update ScriptManager to support content script registration

* Add webNavigation as an optional permission
2021-11-23 16:16:13 -05:00
toasted-nutbread
cedf6b25c4
ScriptManager (#2021)
* Create ScriptManager class

* Use ScriptManager in Backend
2021-11-22 19:29:20 -05:00
toasted-nutbread
b0a0184334
Update sentence parsing settings (#2020)
* Update description

* Update descriptions of the parsing algorithms
2021-11-21 22:09:58 -05:00
toasted-nutbread
005f9658d9
Action handler name disambiguation (#2018)
* Disambiguate PopupFactory action handlers

* Update HotkeyHandler action names

* Disambiguate Frontend action handlers

* Disambiguate Display action handlers

* Disambiguate PopupPreviewFrame action handlers

* Disambiguate Yomichan action handlers

* Disambiguate Frontend action handlers

* Disambiguate Display action handlers

* Disambiguate SearchDisplayController action handlers
2021-11-21 15:54:58 -05:00
toasted-nutbread
06e70c1cd8
FrameOffsetForwarder fixes (#2017)
* Fix handling of null iframe rect

* Handle errors inside of getOffset
2021-11-21 15:08:39 -05:00
toasted-nutbread
36967b1839
General refactoring (#2016)
* Remove // Public comments

* Fix errors

* Remove source parameter from Popup*.setOptionsContext
2021-11-21 12:34:57 -05:00
toasted-nutbread
3c798ae36d
Refactor isExtensionUrl (#2015)
* Update isExtensionUrl to work even if the extension is unloaded

* Simplify
2021-11-21 12:27:29 -05:00
toasted-nutbread
70ac6c51f9
Don't clear the selection before the text scanner has been enabled (#2006) 2021-11-13 11:11:33 -05:00
toasted-nutbread
657292733d
Fix search page not being cleared properly (#2005) 2021-11-13 09:29:58 -05:00
toasted-nutbread
c1a51ae41f Update version 2021-10-31 21:47:00 -04:00
toasted-nutbread
2dc8394c72
JSDoc update (#1996)
* Update core.js docs to include types.

* Update docs
2021-10-31 21:45:57 -04:00
toasted-nutbread
f978819a33
Don't stop audio playback when hiding a popup (#1995) 2021-10-21 19:56:43 -04:00
toasted-nutbread
9ae38bd8e9
Display menu button (#1992)
* Implement new menu which includes a debug log option

* Update wording
2021-10-17 09:55:13 -04:00
toasted-nutbread
ca4ed0300b
Display button updates (#1991)
* Update display buttons

* Remove use of _addMultipleEventListeners
2021-10-17 00:15:43 -04:00
toasted-nutbread
75aabd983d
String frequency support (#1989)
* 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
2021-10-14 21:26:53 -04:00
toasted-nutbread
11f7591a7f
Fix query being set to null when an empty search page is opened (#1988) 2021-10-14 21:16:40 -04:00
Shadowlauch
b3d38fce47
fix DOMRect for vertical position calculation (#1986) 2021-10-14 19:29:52 -04:00
toasted-nutbread
0a8992d215
Search query back button (#1981)
* Always allow history to go back/forward when using browser history

* Add a back button which is visible when using the query parser
2021-10-09 17:06:51 -04:00
toasted-nutbread
0e4b769390
Search CSS updates (#1979)
* Update styles

* Limit the height of the query parser
2021-10-09 14:32:56 -04:00
toasted-nutbread
e3986196e1
Disable background clipboard monitor, mecab, and anki if disabled (#1977) 2021-10-03 16:46:22 -04:00
toasted-nutbread
be8ef53e90
Display refactoring (#1978)
* Refactor _setContentTermsOrKanji

* Update query assignment

* Simplify

* Remove redundant _updateQueryParser

* Reorder query assignment

* Remove isTerms, replace with isKanji

* Simplify defaults

* Refactor events

* Update DisplayAnki to use events

* Simplify

* Update DisplayAudio to use events

* Simplify

* Move audio hotkeys

* Add frameVisibilityChange event

* Fix name

* Add logDictionaryEntryData event

* Move clearAutoPlayTimer handler

* Fix call

* Externalize DisplayAnki and DisplayAudio from Display

* Simplify clear
2021-10-03 16:46:15 -04:00
toasted-nutbread
d14268eb57 Update version 2021-09-30 21:13:12 -04:00
toasted-nutbread
52e4bc8e6a
Add disable-popup-preview option to the settings page (#1974) 2021-09-30 21:12:26 -04:00
toasted-nutbread
19eb990aeb
DOMRect update (#1973)
* Compare using left/top rather than x/y

* Simplify

* Update Popup*.getFrameRect to return a custom structure

* Don't use x/y on DOMRect
2021-09-30 21:05:34 -04:00
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
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