toasted-nutbread
a2e6de84af
Dictionary delete improvements ( #844 )
...
* Change where clearDatabaseCaches occurs
* Move dictionary deletion into the settings page
* Remove api.deleteDictionary
2020-09-19 17:17:33 -04:00
toasted-nutbread
1078ab99b7
Fix settings sanitization resulting in invalid data for the schema ( #843 )
2020-09-19 17:15:34 -04:00
toasted-nutbread
2ff4f83072
Modal refactor ( #842 )
...
* Add Modal class
* Use Modal class
2020-09-19 17:14:51 -04:00
toasted-nutbread
613c7ebf69
Remove border/margin/padding/pointerEvents from iframe ( #841 )
2020-09-19 17:13:34 -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
ad8e9fe8e2
Add missing null check ( #836 )
2020-09-17 20:22:29 -04:00
toasted-nutbread
613252e320
Remove unused handlebars script ( #833 )
2020-09-15 20:07:44 -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
8d28477562
Fix default options missing profiles ( #829 )
...
* Add minItems requirement for profiles array
* Use minItems/maxItems for default value construction
2020-09-13 19:59:02 -04:00
toasted-nutbread
5ec5d0c91c
Database change event ( #826 )
...
* Add api.triggerDatabaseUpdated and yomichan.on('databaseUpdated')
* Update databaseUpdated event usage
2020-09-13 18:43:44 -04:00
toasted-nutbread
8b033a1650
Profile controller refactor ( #825 )
...
* Add refresh function
* Create new ProfileController class
2020-09-13 18:42:37 -04:00
toasted-nutbread
d7c3c87d99
Mouse button modifier update ( #824 )
...
* Ensure buttons is positive before adding to set
* Break early when there are no flags remaining
2020-09-13 13:43:38 -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
b180ebc3bc
Settings upgrade and schema fixes ( #823 )
...
* Add missing defaults
* Always include touch input during upgrade
2020-09-13 13:16:56 -04:00
toasted-nutbread
a12c4a1dd7
Add workaround for Firefox bug not detecting pen input type correctly ( #821 )
2020-09-13 11:58:07 -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
efd0de6bc0
Add workaround for Firefox bug not detecting pen input type correctly ( #820 )
2020-09-13 11:28:13 -04:00
toasted-nutbread
fcb8806717
Fix location of _enabled assignment ( #818 )
2020-09-12 19:42:09 -04:00
toasted-nutbread
9f1753a565
Update TextScanner.setEnabled to not reset state if unnecessary ( #817 )
2020-09-12 19:36:51 -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
568775c6dc
Text scanner cause update ( #813 )
...
* Rename _searchAtFromMouse to _searchAtFromMouseMove
* Rename cause 'mouse' to 'mouseMove' for clarity
2020-09-11 22:46:41 -04:00
toasted-nutbread
e56674e4ee
Text scanner refactoring ( #812 )
...
* Add functions _onPrimaryTouchStart and _onPrimaryTouchEnd
* Add "type" to input details
2020-09-11 20:24:51 -04:00
toasted-nutbread
6e7b9fcf99
Clear state when refreshing enabled state ( #811 )
2020-09-11 18:44:53 -04:00
toasted-nutbread
a5845df123
Add support for pointer event input detection ( #810 )
2020-09-11 16:57:57 -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
0c2f0aa4eb
Fix adding new scanning inputs not working ( #808 )
2020-09-11 16:03:46 -04:00
toasted-nutbread
f168efb69c
OptionsUtil refactor / options default values ( #807 )
...
* Replace _readFile with _fetchAsset for consistency with Backend
* Fix error messages
* Make OptionsUtil non-static
* Update how default options are assigned
* Add createValidatingProxy
* Add validate, update _onApiSetAllSettings
* Remove unused api.optionsSchemaGet
* Remove Backend._optionsSchema
* Update OptionsUtil to create its own JsonSchemaValidator
* Rename Backend._optionsSchemaValidator
* Make getDefault non-async
2020-09-11 14:15:08 -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
18634dca1a
Fix scanning inputs upgrade using the wrong format ( #805 )
2020-09-11 00:29:38 -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
9ce682272c
Add api.injectAnkiNoteMedia ( #803 )
2020-09-10 16:18:36 -04:00
toasted-nutbread
892f7ed3b8
Anki note api functions ( #802 )
...
* Assign duplicateScope to a variable
* Add api.addAnkiNote
* Add api.getAnkiNoteInfo, update returned data format
2020-09-10 16:05:17 -04:00
toasted-nutbread
3dd4822ab3
Anki note media injection move ( #801 )
...
* Move anki note media injection functionality into Backend
* Add marker/mode checks
* Remove media injection from AnkiNoteBuilder
2020-09-10 15:04:54 -04:00
toasted-nutbread
52b0feb255
Move TextToSpeechAudio to a separate file ( #800 )
2020-09-10 12:06:56 -04:00
toasted-nutbread
35abd517b9
AudioUriBuilder simplification ( #799 )
...
* Rename variables to disambiguate
* Update handler argument convention
* Update getUri argument convention
* Change _getAudioUri argument convention
* Change getDefinitionAudio argument convention
* Add api.getDefinitionAudio definition
2020-09-10 11:57:38 -04:00
toasted-nutbread
17ebe6a754
Create abstraction class for parsing DOM ( #798 )
2020-09-10 11:30:01 -04:00
toasted-nutbread
58e5ddfde0
Generalize AnkiNoteBuilder to not use audioSystem directly ( #796 )
2020-09-09 21:07:18 -04:00
toasted-nutbread
5d2261acb9
Update the AnkiController class to use an instance of AnkiConnect directly ( #795 )
...
* Update AnkiController to use AnkiConnect instance directly
* Remove unused
2020-09-09 17:46:34 -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
acb7ad32f3
Anki media injection move ( #793 )
...
* Update AnkiNoteBuilder to not store a reference to an AniConnect instance
* Use more consistent details format
* Organize options assignment
* Move media injection
* Inject images before injecting audio
* Make functions private
* Make static functions private
2020-09-09 16:57:35 -04:00
toasted-nutbread
c0a6849f98
Use common function for data URL mediatype/data extraction ( #792 )
2020-09-09 13:10:51 -04:00
toasted-nutbread
e3a7678769
Anki screenshot refactor ( #791 )
...
* Use more consistent style for injectScreenshot
* Move screenshot generation into AnkiNoteBuilder/Backend
* Get optionsContext before await
2020-09-09 12:54:59 -04:00
toasted-nutbread
2aa86cc5f8
Anki API refactor ( #790 )
...
* Add function guiBrowseNote
* Assign default server as null
* Use get/set properties for server/enabled
* Refactor option values
* Refactor createNote/Data functions to not use options format directly
* Use createNote for testing
* Add errors
2020-09-09 11:54:40 -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
ab4dbacc4c
Move assignment of the operating system property ( #786 )
2020-09-08 19:36:15 -04:00
toasted-nutbread
46af4c9da4
Text scanner fixes and refactoring ( #788 )
...
* Fix incorrect argument being passed
* Clear causeCurrent
* Change cause string to a more general input object
2020-09-08 19:23:32 -04:00
toasted-nutbread
c1b16cebe7
Refactor how TextScanner's public search() function is used ( #787 )
2020-09-08 18:52:23 -04:00
toasted-nutbread
5af3c680e4
Fix modifier keys not being spread ( #785 )
2020-09-08 12:39:51 -04:00
toasted-nutbread
f7093b4c1a
Anki note clipboard marker ( #780 )
...
* Update fields reference
* Add support for adding clipboard images to anki notes
* Add handlebars templates
* Add markers
* Add markers to readme
2020-09-08 11:01:08 -04:00
toasted-nutbread
36fc5abae5
Modifier key refactor ( #784 )
...
* Add functions for getting keyboard key information
* Use os + DocumentUtil to get modifier key names
* Remove keyboard modifier info from environment info
2020-09-08 10:53:41 -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
59559fc560
Profile conditions fixes and improvements ( #782 )
...
* Fix operator changes
* Fix default value not changing during type change
* Fix incorrect display value being assigned
* Refactor _updateValueInput
2020-09-07 13:22:34 -04:00
toasted-nutbread
7a59ca2926
Update the functions for upgrading anki templates to be more reusable ( #779 )
2020-09-06 14:39:18 -04:00
toasted-nutbread
115afb63b9
Add api.clipboardGetImage ( #778 )
...
* Rename clipboardPasteTarget to just target
* Remove else block
* Add helper functions
* Defer assignment of clipboard paste target
* Add api.clipboardGetImage
2020-09-06 14:38:03 -04:00
toasted-nutbread
b28241dbf2
Fix error handling for screenshot captures ( #777 )
2020-09-06 14:36: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
55770934f8
Fix touch input always being disabled ( #772 )
2020-09-05 21:44:05 -04:00
toasted-nutbread
2f8408ffcc
Text scanner refactor ( #771 )
...
* Create searchAt wrappers
* Add optional support for searching on the click event
* Update QueryParser to use TextScanner's searchOnClick functionality
* Move/rename searchAt
* Move pendingLookup checks
* Add 'searched' event to TextScanner
* Use common searched event for Frontend and QueryParser
* Move functions, make private
2020-09-05 21:43:19 -04:00
toasted-nutbread
dd8e32e7c4
Fix template renderer sandbox compatibility ( #770 )
...
* Use Object.prototype.hasOwnProperty.call instead of hasOwn
* Disable WebExtension and core.js APIs for template-renderer.js
2020-09-04 18:19:43 -04:00
toasted-nutbread
1cc9f4b1a4
Remove old conditions.js references ( #769 )
2020-09-04 18:12:33 -04:00
toasted-nutbread
d34f1eab02
Make fetchModifyHeaders private ( #767 )
2020-09-04 18:00:22 -04:00
toasted-nutbread
cf35b9338f
Fix cross frame comm issues ( #765 )
...
* Send ack before sending error response
* Fix error response not being JSON'ified
* Use _sendResult
2020-09-04 17:59:38 -04:00
toasted-nutbread
95bfe2d901
Popup proxy improvements ( #764 )
...
* Fix incorrect function invocations
* Ignore setVisibleOverride when it returns null
* Omit redundant async
* Change default return value
2020-09-04 17:58:43 -04:00
toasted-nutbread
8d53474945
Add api.isTabSearchPopup ( #763 )
...
* Add api.isTabSearchPopup
* Fix missing asyncs
2020-09-04 17:57:51 -04:00
toasted-nutbread
21fc0a80f2
Defer assignment of marker ( #762 )
2020-09-04 17:57:05 -04:00
toasted-nutbread
3efd4a1a94
Fix log context not being in the correct format ( #761 )
2020-09-04 17:56:20 -04:00
toasted-nutbread
4cd1676ddc
Handle error if _waitForFrontendReady fails when creating a popup proxy ( #760 )
2020-09-04 17:55:25 -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
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
e606a78b18
Fix version
2020-09-04 17:50:24 -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
bbfe5f81cb
Fix sessionStorage not being supported when cookies are disabled ( #756 )
...
* Fix sessionStorage not being supported when cookies are disabled
* Update comment
2020-08-24 18:26:04 -04:00
f3f6ddd1fa
Verison bump to 20.8.23.0
2020-08-23 18:11:11 -07:00
toasted-nutbread
773e28aa3c
Fix screenshot popup hide ( #753 )
...
* Refactor Popup.setVisibleOverride
* Use event to observe visibility changes
* Add setAllVisibleOverride/clearAllVisibleOverride
* Add setAllVisibleOverride/clearAllVisibleOverride cross frame handlers
* Update how visibility is changed
* Wait for next frame to ensure visibility has been updated
2020-08-23 15:18:41 -04:00
toasted-nutbread
934355dd09
Add promiseAnimationFrame function ( #752 )
2020-08-23 12:43:53 -04:00
toasted-nutbread
1ab853a4d5
Display owner frame ( #751 )
...
* Move ownerFrameId definition to Display
* Rename _invoke to _invokeOwner
2020-08-23 11:15:23 -04:00
toasted-nutbread
a96e1c20a7
Dynamic property ( #749 )
...
* Add DynamicProperty class
* Add tests for DynamicProperty
2020-08-22 17:50:56 -04:00
toasted-nutbread
f0c974d319
Move generateId to core.js ( #748 )
2020-08-22 15:49:24 -04:00
toasted-nutbread
9fa0f2a56a
Move findTerms and findKanji functions into TextScanner ( #747 )
2020-08-22 14:40:44 -04:00
toasted-nutbread
bdb4c21a78
Make Popup extend EventDispatcher for parity with PopupProxy ( #746 )
2020-08-22 14:35:29 -04:00
toasted-nutbread
1dc35dd6f1
Popup factory proxy creation ( #745 )
...
* Change getOrCreatePopup to async
* Rename parentFrameId to frameId, expose frameId property
* Update how proxy popups are created
2020-08-22 14:33:41 -04:00
toasted-nutbread
e9c540a0b9
Fix error during pitch accent info generation for kanji data ( #744 )
2020-08-22 13:10:50 -04:00
toasted-nutbread
cc9481bd38
Revert "Add PopupVoid ( #734 )" ( #739 )
...
This reverts commit 90d6944290
.
2020-08-22 13:04:20 -04:00
toasted-nutbread
1f564b94cb
XMLDocument handling ( #738 )
...
* Add tests for SVGs
* Add more null checks for Frontend._popup
* Use null popup when on an XMLDocument
2020-08-22 13:03:35 -04:00
toasted-nutbread
c26c4ae0cb
Frontend initialization refactor ( #737 )
...
* Fix incorrect popup depth reassignment
* Rename variable
* Rename property
* Use explicit parameter values
* Refactor setupNestedPopups
* Refactor frontend initialization
2020-08-16 16:16:18 -04:00
toasted-nutbread
90d6944290
Add PopupVoid ( #734 )
2020-08-15 17:37:56 -04:00
toasted-nutbread
4d6851ec32
Refactor some frontend cross-frame communication ( #733 )
...
* Refactor iframe proxy setup
* Simplify document title acquisition
2020-08-15 17:36:42 -04:00
toasted-nutbread
d5865db457
Popup API refactor ( #732 )
...
* Simplify how parent/child are set
* Remove unused public frameId property
* Change use of getFrame
* Simplify parent access
* Use property for the container
* Remove isProxy
* Public function API parity
* Public property API parity
2020-08-15 17:27:03 -04:00
toasted-nutbread
d582c7a0f8
JSON schema refactor ( #731 )
...
* Remove JsonSchema.clone
* Move createProxy function
* Group public properties first
* Create private version of getPropertySchema
* Mark functions as private
* Use non-static getValidValueOrDefault
* Mark private
* Make public validate function not take an info parameter
* Remove JsonSchema
* Add isValid function
* Use isValid for some tests
* Fix incorrect type
2020-08-15 17:23:09 -04:00
toasted-nutbread
d8649f40d5
JSON-schema-based profile conditions ( #730 )
...
* Add ProfileConditions class
* Add URL to VM
* Add new ProfileConditions tests
2020-08-15 17:22:23 -04:00
toasted-nutbread
587822c16e
More JSON schema improvements ( #729 )
...
* Add support for constant values
* Add contains check for arrays
* Add tests
* Simplify getValidValueOrDefault testing
2020-08-11 19:21:26 -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
toasted-nutbread
9f8f83508e
Merge dictionary.js functions into Translator class ( #726 )
...
* Move dictFieldSplit
* Copy dictionary.js definitions into translator.js
* Convert to member functions
* Refactor names
* Remove dictionary.js
* Rename
2020-08-09 21:04:09 -04:00
toasted-nutbread
f502dd4f21
Search refactoring ( #725 )
...
* Rename node fields to disambiguate
* Change order
2020-08-09 21:03:11 -04:00
toasted-nutbread
486d44f719
Json schema improvements ( #722 )
...
* Add support for regex pattern testing
* Add tests
* Separate JsonSchemaProxyHandler statics into JsonSchemaValidator
* Use this instead of JsonSchemaValidator
* Make JsonSchemaValidator non-static
* Use cache map for regex
2020-08-09 14:18:59 -04:00
toasted-nutbread
fbe575c577
Fix a stray error printed due to not catching ( #723 )
2020-08-09 14:14:56 -04:00