Commit Graph

147 Commits

Author SHA1 Message Date
toasted-nutbread
8766744aa4
Popup window options (#1245)
* Add popupWindow options

* Add toBoolean converter

* Add settings

* Use new options

* Add test link

* Fix window state not working

* Make the window section advanced only
2021-01-16 10:22:24 -05:00
toasted-nutbread
0a1664ba29
Separate close hotkey (#1242)
* Add focusSearchBox hotkey

* Update close hotkey action

* Update hotkeys
2021-01-15 20:19:56 -05:00
toasted-nutbread
1dcfbf6ba6
Support suspending new anki cards (#1240)
* Add new option: anki.suspendNewCards

* Update Anki APIs

* Suspend card based on options

* Add setting

* Disable wrap for toggle property
2021-01-14 22:42:11 -05:00
toasted-nutbread
84d3af0f8d
Hotkeys (#1236)
* Set up hotkey inputs

* Improve key display

* Add setInput

* Add KeyboardShortcutController

* Update how display handles hotkeys
2021-01-14 20:56:18 -05:00
toasted-nutbread
25080ac82e
Change popupActionBarLocation to top (#1222) 2021-01-10 16:49:40 -05:00
toasted-nutbread
f6a38f40dc
Customizable sentence parsing (#1217)
* Add new sentenceParsing options

* Update TextScanner.setOptions

* Assign terminator/quote maps

* Pass sentence parsing info to extractSentence

* Simplify setting

* Add setting for enableTerminationCharacters

* Create new settings for sentence termination characters
2021-01-10 14:43:06 -05:00
toasted-nutbread
083da93142
Refactor sentence parsing (#1215)
* Rename sentenceExtent with sentenceScanExtent

* Update TextScanner.setOptions

* Change function argument order

* Rename quote map variables

* Fix edge case quote handling

* Update terminator maps to support character inclusion
2021-01-09 23:10:55 -05:00
toasted-nutbread
da1e1e5c5b
Sentence parsing options (#1214)
* Rename options.anki.sentenceExt to options.sentenceParsing.scanExtent

* Create sentence parsing icon

* Create new sentence parsing section
2021-01-09 21:25:04 -05:00
toasted-nutbread
d698911bc9
Refactor sentence scanning (#1213)
* Update tests

* Update extractSentence implementation

* Remove old extractSentence implementation

* Optimize maps/sets
2021-01-09 19:02:51 -05:00
toasted-nutbread
63971776a5
CSS lint (#1201)
* Use single quotes instead of double

* Install stylelint

* Set up config

* Update package/tests

* Fix lint issues

* Update CSS rules
2021-01-03 15:30:38 -05:00
toasted-nutbread
8e304b83c6
Translator regex replacements (#1199)
* Add support for regex replacements during the translation process

* Allow assignment of textReplacements

* Rename

* Set up test data

* Write expected data

* Set up options

* Prevent infinite loop if regex matches empty string

* Implement setting controller

* Add support for testing pattern replacements
2021-01-03 12:12:55 -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
4650f0b542
Translator frequency data improvements (#1184)
* Specify if a frequency has a specific reading

* Make frequency data creation more standardized

* Update test data
2020-12-30 15:12:08 -05:00
toasted-nutbread
c03340c4aa
Change popupCurrentIndicatorMode default to triangle (#1161) 2020-12-22 18:22:14 -05:00
toasted-nutbread
a354becd51
Furigana distribution improvements (#1157)
* Improve furigana when reading kana is not an exact match

* Simplify group structure

* Return consistent type

* Add more tests

* Remove redundant isAmbiguous assignment

* Simplify group usage

* Add helper function

* Optimize returned arrays

* Use variable

* Remove s(p)lice calls

* Reduce number of convertKatakanaToHiragana calls

* Optimize text length access

* Optimize reading substring

* Move segmentize to a separate function

* Use var

* Use _createFuriganaSegment

* Optimize distributeFuriganaInflected
2020-12-22 11:02:19 -05:00
toasted-nutbread
abc017545c
Update the popup preview to always be visible on the settings v2 page (#1151) 2020-12-20 22:16:38 -05:00
toasted-nutbread
443d6d1956
Popup action bar options (#1140)
* Add options for action bar visibility and location

* Add settings

* Update styles

* Expose properties

* Update styles

* Update tests
2020-12-19 20:07:55 -05:00
toasted-nutbread
af9b4d2b93
Update termTags for termGrouped mode to include all definition tags (#1138)
* Update termTags for termGrouped mode to include all definition tags

* Update tests
2020-12-19 16:47:32 -05:00
toasted-nutbread
1b1b24ab35
Entry indicator update (#1134)
* Move entry current indicator rules

* Simplify rules

* Add popupCurrentIndicatorMode option

* Add option to settings page

* Expose popupCurrentIndicatorMode

* Restore asterisk current indicator

* Implement dot

* Update action button vars

* Fix tests

* Add none option

* Add triangle option
2020-12-19 15:42:44 -05:00
toasted-nutbread
05d4049f16
DOMParser replacement (#561)
* Add script to build library files

* Add built parse5 library

* Add new SimpleDOMParser which uses parse5

* Update license info

* Update MV3 build to use the new SimpleDOMParser

* Update file exclusions

* Hide/clarify license info for MV2 builds
2020-12-18 17:06:30 -05:00
toasted-nutbread
51223abfa6
Set up initial manifest v3 support (#605) 2020-12-18 15:54:05 -05:00
toasted-nutbread
c728448a4d
Maximum clipboard search length (#1118)
* Add maximumClipboardSearchLength an option

* Add setting

* Add limits

* Update tests
2020-12-18 11:24:43 -05:00
toasted-nutbread
ddb71af6bd
Add zuru deinflections (#1091)
* Update deinflector rule types

* Add deinflection rules for zuru verbs

* Add tests
2020-12-12 10:17:25 -05:00
toasted-nutbread
2484ba68d1
Add classic suru deinflection negative tests (#1090)
* Add negative tests for classic suru verbs

* Add missing test for non-negative classic: causative, potential or passive
2020-12-08 22:59:40 -05:00
toasted-nutbread
df9436bc3e
Add classic suru deinflections (#1089)
* Add classic suru deinflections

* Add tests
2020-12-08 22:39:06 -05:00
toasted-nutbread
2be81cbb77
Update/test deinflector (#1087)
* Update formatting

* Add missing rule for progressive/perfect

* Add adnomial -ki rule

* Update rules for irregular verbs

* Organize rules by rulesOut

For the most part, the order is:
  adj-i => v1 => v5 => vs => vk => other

* Add tests
2020-12-08 20:29:42 -05:00
toasted-nutbread
2910685a96
Database test updates (#1086)
* Remove unused

* Create DatabaseVM

* Update sequences in test dictionary

* Update documentation

* Add second valid testing dictionary

* Set up translator tests

* Write expected data
2020-12-08 20:27:36 -05:00
toasted-nutbread
35fbc76df4
Settings v2 testing setup (#1084)
* Add option for using settings v2

* Add options/info about settings v2

* Use settings v2 URL when applicable

* Update tests
2020-12-06 21:17:05 -05:00
toasted-nutbread
ae9a20e0de
Json schema improvements (#1078)
* Test multipleOf

* Refactor defaulting

* Use default if invalid for non-object/array properties

* Add tests
2020-11-30 18:56:28 -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
008ffdb6bf
Frequencies marker (#1074)
* Update japanese.js tests

* Simplify fallback/early exit

* Add overloads to furigana and furiganaPlain handlebars helper functions

* Expose unique expression/reading arrays (and subsequently counts)

* Add {frequencies} marker
2020-11-28 14:30:50 -05:00
toasted-nutbread
92e9f69c80
Popup style updates (#1066)
* Replace compactGlossaries option with new glossaryLayoutMode option

* Update attributes

* Update attributes

* Update color definitions

* Fix default theme scrollbar
2020-11-25 23:22:05 -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
219dfb4917
Add a core deepEqual function (#1018)
* Add a core deepEqual function

* Add tests
2020-11-09 21:47:25 -05:00
toasted-nutbread
16321a1f8c
Add duplicate check option (#1012)
* Add anki.checkForDuplicates option

* Use checkForDuplicates for button display

* Add property to card creation
2020-11-08 16:25:07 -05:00
toasted-nutbread
7fa4782954
Return an error code when promise main() functions fail (#1002) 2020-11-07 11:34:14 -05:00
toasted-nutbread
0b003ef2c3
Add showPopupPreview to options test (#1001) 2020-11-07 11:31:38 -05:00
toasted-nutbread
5b9d709d40
Conjugation marker (#988)
* Add {conjugation} marker

* Add info

* Add upgrade

* Update test
2020-11-04 20:39:23 -05:00
toasted-nutbread
9e57509e25
Json schema default value improvement (#964)
* Ensure value has property before using its value

* Add tests
2020-10-27 19:40:19 -04:00
toasted-nutbread
dfdefc15d3
Options fixes (#962)
* Fix default options not having the correct versions

* Move schema validation

* Remove legacy version number

* Add tests for OptionsUtil.getDefault()

* Remove unused getValidValueOrDefault
2020-10-27 19:26:30 -04:00
toasted-nutbread
bbb534eff5
Split source.js into two files (#894) 2020-10-07 18:31:28 -04:00
toasted-nutbread
6b6ee76550
Move searchTerms/searchKanji to front of object definitions (#873) 2020-09-27 11:53:07 -04:00
toasted-nutbread
cdd649ea3d
Add scan on touch move and prevent touch scroll options (#871)
* Add scanOnTouchMove/preventTouchScrolling scanning input options

* Add settings controls

* Support scanOnTouchMove in TextScanner

* Support preventTouchScrolling in TextScanner
2020-09-27 11:46:37 -04:00
toasted-nutbread
73dd578821
Add middle mouse prevention option (#868)
* Add preventMiddleMouse option to TextScanner

* Add preventMiddleMouse options

* Add options

* Apply preventMiddleMouse options
2020-09-26 19:24:21 -04:00
toasted-nutbread
c1b5976394
Scanning mouse button fixes (#866)
* Move mouse0 blocking during mousemove into options

* Update primary button detection
2020-09-26 17:51:52 -04:00
toasted-nutbread
7d78e8737f
Cache map improvements (#856)
* Update CacheMap API; get=>getOrCreate; add get; add set; add has

* Update tests

* Add more tests
2020-09-22 20:09:12 -04:00
toasted-nutbread
943ec41336
Add tests for options updating (#852) 2020-09-20 11:33:12 -04:00
toasted-nutbread
51d4e5b0ff
Dev/test script organization (#846)
* Move lint scripts

* Move dictionary-validate.js

* Move schema-validate.js

* Move createTestDictionaryArchive, remove yomichan-test.js

* Rename yomichan-util.js to util.js

* Move test/yomichan-vm.js to dev/vm.js

* Move getArgs into util.js (and fix name)

* Create test-all.js

* Update test-code script
2020-09-19 19:04:28 -04:00
toasted-nutbread
8cd5a2f75f
Profile conditions cleanup (#768)
* Remove conditions.js

* Rename profile-conditions2.js to profile-conditions.js
2020-09-04 17:53:29 -04:00
toasted-nutbread
89a83a9ed3
Add tests for data: and blob: iframe URLs (#757) 2020-08-24 20:17:10 -04:00