Commit Graph

3805 Commits

Author SHA1 Message Date
ac373a6794 Update testing version to 22.9.9.0 2022-09-11 10:55:23 -07:00
toasted-nutbread
227cbbc7cd Version update 2022-09-09 19:58:51 -04:00
Alexei Yatskov
09f885a6c2
Merge pull request #2222 from toasted-nutbread/remove-dictionaries
Remove old dictionaries
2022-08-31 19:39:26 -07:00
toasted-nutbread
e242b6598c
Update readme (#2221) 2022-08-21 12:21:59 -04:00
toasted-nutbread
b0ae419634 Remove dictionaries 2022-08-21 12:20:53 -04:00
toasted-nutbread
e7944d29b0
TextSourceElement surrogate pair support (#2217)
* Update StringUtil

* Refactor

* Handle UTF-16 surrogate pairs
2022-08-20 14:32:34 -04:00
toasted-nutbread
4194252fe3
New StringUtil (#2216)
* Create new StringUtil

* Use StringUtil in DOMTextScanner

* Fix order
2022-08-20 13:11:38 -04:00
toasted-nutbread
d3807d88ec
ArrayBufferUtil (#2215)
* Rename StringUtil to ArrayBufferUtil

* Update docs

* Rename file string-util.js to array-buffer-util.js
2022-08-20 12:53:22 -04:00
toasted-nutbread
cd0a6b60e2
Fix setEndOffset (#2214)
* Add _layoutAwareScan option to TextSourceElement.setEndOffset for parity

* Remove default param
2022-08-20 12:38:55 -04:00
toasted-nutbread
c5c5308ff2
Update DOMTextScanner to support UTF-16 surrogate pairs (#2213) 2022-08-20 11:32:20 -04:00
toasted-nutbread
5c267f4bb7
Profile index fixes (#2207)
* Update settings controller to consistently initialize

* Allow profile index to be reset if an error occurs

* Update message handler to be async

* Fix error when deleting the current profile
2022-08-20 11:31:50 -04:00
toasted-nutbread
9436928e3d
Optimize AnkiConnect.findNoteIds (#2190)
* Use for loop rather than map

* Add _getNoteQuery

* Optimize findNoteIds to reduce repeat queries
2022-08-20 11:31:06 -04:00
toasted-nutbread
5dcb698a5a
Update browser bugs (#2189) 2022-08-20 11:29:47 -04:00
toasted-nutbread
ada4df1971
Fix invalid default values for popupTheme and popupOuterTheme (#2180)
* Fix invalid default values for popupTheme and popupOuterTheme

* Options update
2022-08-20 11:29:31 -04:00
toasted-nutbread
0b1ad40347
CSS zoom handling (#2178)
* Refactor

* Handle CSS zoom when scanning
2022-08-20 11:20:23 -04:00
toasted-nutbread
310303ca1a
Audio download timeout (#2187)
* Add support for an idle timeout when downloading audio

* Update eslint rules

* Pass idleTimeout to the downloader from DisplayAnki

* Add anki.downloadTimeout setting

* Update tests

* Assign _audioDownloadIdleTimeout using settings

* Show info about cancelled downloads

* Handle Firefox bug

* Improve audio errors

* Refactor

* Move functions to RequestBuilder
2022-08-20 11:17:24 -04:00
toasted-nutbread
02483a45b1
Fix TextSourceElement.getRects (#2177) 2022-08-20 11:14:46 -04:00
Stephen Kraus
c331ceae99
Add new structured content styling options (#2203)
Allow for arbitrary string assignment to the font-size property.
https://developer.mozilla.org/en-US/docs/Web/CSS/font-size

Add support for the text-align property.
https://developer.mozilla.org/en-US/docs/Web/CSS/text-align

Co-authored-by: stephenmk <stephenmk@users.noreply.github.com>
2022-08-14 13:30:25 -04:00
289a61a62f Remove metadata which is no longer needed for generating foosoft.net 2022-07-14 10:44:33 -07:00
70c3c4a66c Update updates.json for testing release 2022-07-03 11:38:12 -07:00
oakkitten
49c75c3093
Do not change selection if user selected text manually (#2186)
* Do not change selection if user selected text manually

* Remove capture argument for selectionchange listener

It is not applicable

* Make a note of user selection when Yomichan is enabled

User might have some text selected on a page prior to enabling Yomichan
via the toolbar icon; let it stay intact.

* Extract selection change by user listener into a method
2022-07-01 17:12:55 -04:00
toasted-nutbread
4e7762edac Update version 2022-06-06 22:49:28 -04:00
toasted-nutbread
4545900f70
TextScanner refactor (#2174)
* Refactor input conversion, add additional validation

* Simplify input data structure
2022-06-05 22:46:00 -04:00
toasted-nutbread
6cc57d953d
Settings modal updates (#2173)
* Move the "Add" button into the footer

* Scroll to the bottom when adding

* Move the Audio Sources add button

* Simplify, remove the (?) link

* Move "Add" button to footer
2022-06-03 18:19:40 -04:00
toasted-nutbread
c966d9b1eb
Touch and pen input updates (#2172)
* Remove unnecessary return

* Move touch start input filtering

* Refactor

* Add scanOnTouchPress

* Add preventPenScrolling

* Rename scanOnPenPress to scanOnPenMove

* Rename scanOnPenRelease to scanOnPenReleaseHover

* Simplify

* Refactor _searchAtFromPen early exit

* Merge _penPointerPressed and _penPointerReleased into a single variable

* Add more options

* Simplify pen pointer coordinates

* Implement scanOnPenPress and scanOnPenRelease

* Implement scanOnTouchRelease

* Fix tests

* Don't search on touch cancel

* Cancel touch if the touch action is used for scrolling or other gestures

* Fix incorrect scroll prevention options being used

* Organize options

* Fix typos
2022-06-03 17:11:32 -04:00
toasted-nutbread
e61edc387c
More Safari support (#2171)
* Add support for not building a zip

* Update gitignore

* Add safari variant
2022-06-01 17:29:41 -04:00
toasted-nutbread
aa5e13b441
Collapsible dictionary updates (#2170)
* Add "force collapsed" and "force expanded" options

* Simplify "any" check

* Update style

* Add help modal for collapsible dictionaries

* Disable wrapping
2022-05-30 13:34:37 -04:00
toasted-nutbread
19bba07a8b
Add support for Anki API key (#2169)
* Update material.css to support password fields

* Support password

* Add "apiKey" setting

* Use apiKey

* Update options if API key changes

* Update tests
2022-05-30 12:03:24 -04:00
toasted-nutbread
0b5d54e7c6
Rename anki.js to anki-connect.js to more accurately reflect class name (#2167) 2022-05-29 21:42:26 -04:00
toasted-nutbread
331a2e6294
Add support for guiEditNote to view notes (#2143)
* Add AnkiConnect.guiEditNote

* Update _onApiNoteView to first try guiEditNote

* Add setting

* Update noteView API

* Use setting

* Return which mode was used

* Update DisplayGenerator

* Handle errors in DisplayAnki

* Update docs

* Add isErrorUnsupportedAction function

* Add an allowFallback option to noteView

* Disambiguate

* Simplify now that preferredMode isn't used

* Update settings info

* Implement test buttons

* Update styles

* Update status visibility

* Wrap layout

* Update description

* Update date
2022-05-29 21:24:41 -04:00
toasted-nutbread
f3024c5018
Sort using number of definitions (#2166) 2022-05-29 20:53:21 -04:00
toasted-nutbread
5d0c22e76d
Sort using frequency dictionary before using dictionary priority (#2165) 2022-05-29 13:32:22 -04:00
toasted-nutbread
46fda6e653
Update referenceUrl to include fragment (#2164) 2022-05-29 12:02:31 -04:00
toasted-nutbread
47194926f3
Add an issues page with information about some errors (#2163) 2022-05-28 22:22:15 -04:00
toasted-nutbread
0d82c52a76
HTML page script refactoring (#2162)
* Move some common functionality

* Move setupEnvironmentInfo into ExtensionContentController

* Move background/environment.js to extension/environment.js
2022-05-28 21:57:25 -04:00
toasted-nutbread
4e4fa49b0b
Audio request errors (#2161)
* Generalize _onBeforeSendHeadersAddListener

* Simplify filter assignment

* Use requestId rather than done

* Properly support Firefox addListener without arguments

* Add details to fetchAnonymous errors

* Refactor

* Enable support for no header modifications

* Update MV3 support for error details

* Expose errors in downloadTermAudio

* Throw an error if audio download fails due to potential permissions reasons
2022-05-28 21:55:37 -04:00
toasted-nutbread
756cfc0276
Use \f rather than \x0C for whitespace form feed (#2158) 2022-05-22 13:11:38 -04:00
toasted-nutbread
259a3031ce
Add apiReflect and apiExists to AnkiConnect (#2150) 2022-05-22 11:26:49 -04:00
toasted-nutbread
9800ef5140
Add firefox-mv3 build target (#2155) 2022-05-22 11:26:36 -04:00
toasted-nutbread
5dbc284d53
Simplify assignment of _contentType = 'clear' (#2154) 2022-05-21 17:54:57 -04:00
toasted-nutbread
8b1d4450f5
Fix capitalization of "Non-Standard" (#2153) 2022-05-21 17:24:58 -04:00
toasted-nutbread
fd00a52856
Anki findNotes (#2152)
* Add findNotes API

* Add api.findAnkiNotes
2022-05-21 15:28:44 -04:00
toasted-nutbread
10e9f7acb8
Fix the color of links in display footer notifications (#2151) 2022-05-21 15:28:36 -04:00
toasted-nutbread
e498e2d029
Display notification updates (#2149)
* Expose container and node on DisplayNotification

* Add Display.createNotification

* Rename methods

* Rename fields

* Remove double newline
2022-05-20 18:08:20 -04:00
toasted-nutbread
31e20c889e
ESlint JSdoc (#2148)
* Install eslint-plugin-jsdoc

* Initial rules setup

* Update lists

* Use @returns rather than @return

* Remove error throwing code which is never executed

* Fix issues relating to @throws

* General error fixes

* Update Display type documentation

* Various doc fixes

* Fix invalid tuple syntax

* Doc updates

* Remove unused

* Doc updates

* Enable jsdoc/require-returns

* Update rules

* Update remaining rules
2022-05-20 10:28:38 -04:00
toasted-nutbread
ae0ad227c0
Add mode documentation about the types used by Translator (#2147) 2022-05-19 20:16:40 -04:00
toasted-nutbread
6e239638bb
DOMTextScanner updates (#2146)
* JSDoc updates

* Move function

* Simplify

* Refactor return type

* Refactor getElementSeekInfo return type
2022-05-18 21:43:19 -04:00
toasted-nutbread
a33a00f5ae
CssStyleApplier updates (#2145)
* Update internal structure of _styleData

* Rename parameter

* Rename

* Add docs
2022-05-18 19:40:47 -04:00
toasted-nutbread
18beb241a7
Fix this._horizontalTextPositionBelow being assigned incorrectly (#2144) 2022-05-18 19:12:24 -04:00
toasted-nutbread
bd53f2bbfb
Update _getNodeNoteIds to return integer IDs (#2142) 2022-05-16 22:20:53 -04:00