Commit Graph

218 Commits

Author SHA1 Message Date
toasted-nutbread
5d8ac70395
Display an indication when Anki field order/existence doesn't match (#1119) 2020-12-18 12:05:33 -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
3f7c76dbc7
Yomichan popup styles refactor (#1067)
* Rename classes yomichan-float to yomichan-popup

* Use attributes instead of classes

* Refactor

* Update popup outer scaling

* Update outer theme usage

* Move client.css to popup-outer.css in /mixed
2020-11-26 14:13:53 -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
e4f28b31ce
Move "Enable native popups" option and make advanced (#1037) 2020-11-15 14:16:11 -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
f4325b7db9
Fix byte count labels (#998)
* Add 'TB' label

* Prevent overflow

* Fix storage information on the old settings page
2020-11-07 09:58:46 -05:00
toasted-nutbread
215ef627f1
Duplicate scope options (#955)
* Add deck-root duplicate scope option

* Implement support for deck-root scope
2020-10-31 19:03:45 -04:00
toasted-nutbread
327d7b1f26
Anki templates refactor (#970)
* Support menus with multiple sources

* Update anki templates controller
2020-10-30 17:41:52 -04:00
toasted-nutbread
ba59327354
Dictionary controllers update (#965)
* Make purge notification optional

* Support multiple warning nodes

* Add support for optional count info
2020-10-27 21:20:26 -04:00
toasted-nutbread
45627bd6e6
Fix class name (#961) 2020-10-27 19:24:17 -04:00
toasted-nutbread
502ca9c96e
Remove limits for popup horizontal/vertical offsets (#960) 2020-10-27 19:23:03 -04:00
toasted-nutbread
defd7402cf
Anki controller refactor (#954)
* Simplify data transform for anki.enable setting

* Refactor AnkiController

* Implement marker link clicking

* Request permissions for clipboard
2020-10-25 13:34:42 -04:00
toasted-nutbread
9e9bd0dcf6
Profile controller refactor (#953)
* Udpate selectors

* Optional remove button

* Add menu

* Refactor ProfileController

* Fix selector
2020-10-24 16:01:13 -04:00
toasted-nutbread
fcf63d71f5
Profile controller refactor (#950)
* Add additional fields for consistency

* Fix copy confirm not working correctly

* Update IDs
2020-10-20 22:15:11 -04:00
toasted-nutbread
23230b8a7c
Backup controller refactor (#946)
* Update IDs

* Change how default fieldTemplates is assigned

* Ensure no missing fields

* Fix error display during import
2020-10-19 20:05:45 -04:00
toasted-nutbread
6f1bdf0c66
Modal split (#930)
* Move jQuery-based modal into a separate class

* Remove jQuery conditions for default modal
2020-10-18 09:27:32 -04:00
toasted-nutbread
642c434829
SelectorObserver (#927)
* Create new SelectorObserver class

* Update DOMDataBinder to use SelectorObserver

* Update names to be more clear

* Remove attributeOldValue parameter, clarify attributes parameter

* Add documentation
2020-10-17 16:33:11 -04:00
toasted-nutbread
51904761ce
Add simple scan input UI (#921)
* Add simple scan input UI

* Create helper function

* Add controller for old scanning input UI

* Add refresh functions

* Add abstraction function

* Fix incomplete middle mouse support detection

* Make scanning inputs update eachother

* Fix global declaration order
2020-10-14 19:37:46 -04:00
toasted-nutbread
5b5b45b88e
Dictionary controller refactor (#912)
* Support multiple main dictionary selects

* Update progress container

* Change class name

* Simplify dictionary info

* Update outdated node visibility

* Simplify node usage

* Simplify title

* Update classes

* Update IDs/classes

* Remove details container visibility assignment

* Use a template for dictionary details

* Fix progress bar visibility

* Fix incorrect property

* Rename dict-details to dictionary-details

* Remove unused classes

* Update class names for dictionary templates

* Rename templates

* More id renaming

* Remove unused id

* Rename more IDs
2020-10-11 17:31:58 -04:00
toasted-nutbread
25c590e54b
Add modal controller class (#908)
* Add ModalController

* Use modalController instead of new Modal
2020-10-10 20:58:38 -04:00
toasted-nutbread
0244d07ea9
Storage controller refactor (#907)
* Use array for use/quota nodes

* Use classes instead of ids
2020-10-10 17:37:16 -04:00
toasted-nutbread
19e0346484
Further generalize storage controller by supporting lists of nodes (#906) 2020-10-10 17:31:09 -04:00
toasted-nutbread
199dd7d763
Storage controller refactor (#905)
* Use hidden instead of storage-hidden class

* Refactor storage events

* Make ID more generic

* Update how persistent storage is activated

* Add null checks

* Update HTML/ID

* Disallow disabling persistent storage

* Refactoring

* Update more IDs

* Disable multiple simultaneous stats updates

* Store node references

* Move undefined assignment
2020-10-10 16:54:52 -04:00
toasted-nutbread
3174f3c657
Update audio controller (#904)
* Remove redundant assignment of select value

* Update TTS preparation

* Don't hide options

* Improve voice sorting

* Update event handler

* Apply options to all selects targeting audio.textToSpeechVoice

* Update selector

* Use IDs

* Move test text to a hidden text input
2020-10-10 12:11:33 -04:00
toasted-nutbread
05e51a950e
Settings templates refactor (#897)
* Add template instantiation API to SettingsController

* Use SettingsController.instantiateTemplate
2020-10-07 21:23:42 -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
2ff4f83072
Modal refactor (#842)
* Add Modal class

* Use Modal class
2020-09-19 17:14:51 -04:00
toasted-nutbread
2f4adbab2c
Handlebars sandbox (#612)
* Set up template renderer proxy

* Use proxy

* Remove unused handlebars script tags

* Update manifest
2020-09-18 21:16:39 -04:00
toasted-nutbread
79ef6e151e
Cleanup unused utils (#832)
* Remove api.optionsSave

* Remove getOptionsMutable and getOptionsFullMutable

* Remove util.js

* Remove yomichanBackend
2020-09-15 19:48:58 -04:00
toasted-nutbread
f997f01742
Dictionary controller refactor (#831)
* Create new DictionaryController

* Update input disabling when modifying the database
2020-09-15 19:35:44 -04:00
toasted-nutbread
621aa354e7
Add scan dictionary type filters (#822)
* Add options for searchTerms and searchKanji

* Add settings HTML

* Add options to TextScanner

* Update _search/_findDefinitions to include searchTerms/searchKanji args

* Update _searchAtFromMouseMove args

* Change argument structure for _searchAt

* Use scanning options for searchTerms and searchKanji
2020-09-13 13:25:03 -04:00
toasted-nutbread
5b49cf4398
Pointer events support (#819)
* Add option pointerEventsEnabled

* Add _pointerEventsEnabled option to TextScanner

* Add additional options

* Mouse pointer events

* Touch pointer events

* Pen pointer events
2020-09-13 11:33:10 -04:00
toasted-nutbread
c98aa9ad47
More scanning options (#815)
* Reorganize options

* Add advanced options

* Add a setting transform 'setRelativeAttribute'

* Add advanced options to HTML/CSS
2020-09-12 13:20:02 -04:00
toasted-nutbread
41db9ec89b
Use a grid layout for scanning inputs (#814) 2020-09-12 11:22:17 -04:00
toasted-nutbread
6afbda8dfe
Settings scanning refactor (#809)
* Move option for scanning.touchInputEnabled, make advanced

* Rename
2020-09-11 16:14:32 -04:00
toasted-nutbread
a1729eb9ae
Input type filters (#806)
* Add options for scanning input types

* Move buttons in layout, refactor CSS

* Add options for input types

* Use input type filters

* Add _getMatchingInputGroupFromEvent

* Use input filters for touch events
2020-09-11 14:13:52 -04:00
toasted-nutbread
a531618c48
Use Anki classes directly in Display (#804)
* Add _getTemplates function

* Add template renderer to display pages

* Add AnkiNoteBuilder to Display

* Update AnkiTemplatesController to directly use TemplateRenderer

* Remove old APIs
2020-09-10 18:03:46 -04:00
toasted-nutbread
52b0feb255
Move TextToSpeechAudio to a separate file (#800) 2020-09-10 12:06:56 -04:00
toasted-nutbread
8408bee90a
Settings controller file renaming (#794)
* Rename SettingsBackup to BackupController

* Rename files to more closely match classes

* Improve organization of script imports
2020-09-09 17:37:58 -04:00
toasted-nutbread
0d00f7e1cf
Scanning input generalization (#789)
* Add inputs to options.scanning

* Update CSS for mouse buttons

* Update list counters

* Set up HTML/CSS

* Add input controller

* Use new inputs

* Include mouse buttons

* Update how button inputs are detected

* Add index/empty fields to the input details object

* Update none check for scanning modifier

* Remove old settings

* Remove unused global
2020-09-09 16:59:03 -04:00
toasted-nutbread
b687870a55
Delay hide option (#774)
* Add hideDelay option

* Add _clearSelection

* Use hideDelay

* Prevent repeated delayed selection clears

* Fix popup hide timer being cleared when the cursor is moved into the frame
2020-09-08 19:40:15 -04:00
toasted-nutbread
0a5e832dfd
Mouse inputs (#783)
* Add mouse icon

* Add _updateModifiers

* Add support for mouse button modifiers

* Improve names of mouse inputs

* Improve mouse input sorting

* Rename getModifierKeyStrings to getModifierInputStrings

* Refactor keyboard/mouse inputs into KeyboardMouseInputField
2020-09-07 20:12:43 -04:00
toasted-nutbread
44f38c4dea
Popup window (#773)
* Add option usePopupWindow

* Add PopupWindow class

* Add support for creating PopupWindow
2020-09-05 22:03:35 -04:00
toasted-nutbread
1cc9f4b1a4
Remove old conditions.js references (#769) 2020-09-04 18:12:33 -04:00
toasted-nutbread
d8f488e28c
Settings dictionary import refactor (#759)
* Fix .purge not re-opening the database after deletion failure

* Create DictionaryImportController

* Remove backend dictionary import
2020-09-04 17:54:34 -04:00
toasted-nutbread
f3dd2270a5
Json schema profile conditions (#758)
* Add clearCache function

* Add upgrade

* Use schema-based profile condition validation

* Update profile conditions settings controller

* Remove unnecessary async

* Remove old

* Remove unused templates
2020-09-04 17:44:00 -04:00
toasted-nutbread
abfa0362dd
Remove leftover handlebars.js imports (#728) 2020-08-09 21:18:36 -04:00
toasted-nutbread
2a86d66092
DOM + DocumentUtil merge (#727)
* Add DOM functions to DocumentUtil

* Use DocumentUtil instead of DOM

* Remove DOM

* Move document-util.js into mixed
2020-08-09 21:07:11 -04:00