Commit Graph

255 Commits

Author SHA1 Message Date
toasted-nutbread
7eb7c88394 Return index of the source instead of the source value 2020-04-18 14:23:34 -04:00
toasted-nutbread
e1ebfb02f7 Disable cache on the backend and fix a bug with the cache key 2020-04-18 14:23:34 -04:00
toasted-nutbread
7fc3882607 Update the parameters passed to various audio-related functions 2020-04-18 14:23:34 -04:00
toasted-nutbread
a864cf094f
Merge pull request #437 from toasted-nutbread/backend-api-handler-changes
Backend api handler changes
2020-04-11 11:32:52 -04:00
toasted-nutbread
a296c758b9 apiBroadcast => apiBroadcastTab 2020-04-10 20:00:18 -04:00
4e5029f7ec Update license author field to broader to explicitly reflect that
Yomichan is an ongoing community project. It really does take a village,
and everyone who contributes code owns a part of it :)
2020-04-10 11:10:21 -07:00
toasted-nutbread
a2b66dc6cc Rename apiForward to apiBroadcast 2020-04-07 19:51:39 -04:00
toasted-nutbread
29cf8d2f79 Fix not awaiting this._getNoteContext 2020-04-06 18:55:45 -04:00
toasted-nutbread
199b926f23 Add overridable getDocumentTitle 2020-04-06 18:20:04 -04:00
toasted-nutbread
4011a091b6 Add support for {document-title} 2020-04-06 18:20:04 -04:00
toasted-nutbread
059db280bb Add custom context object for note creation 2020-04-06 18:20:04 -04:00
toasted-nutbread
8b07a23de9 Rename context to details 2020-04-06 18:20:04 -04:00
toasted-nutbread
cbc7e2646d Add options 2020-03-28 10:25:57 -04:00
siikamiika
b616bac66e remove targetPopupId 'all'
Make unset targetPopupId mean the same thing instead
2020-03-21 22:13:07 +02:00
siikamiika
962c2a381f apply all options on profile change 2020-03-21 22:13:07 +02:00
toasted-nutbread
64fc0349a1 Update global declarations 2020-03-10 22:40:35 -04:00
toasted-nutbread
aad4ab5ecc Rename audio functions using "url" to use "uri" 2020-03-07 21:57:26 -05:00
toasted-nutbread
6adf2cf63f Rename function 2020-03-07 21:43:51 -05:00
toasted-nutbread
a8eb50d96f Use dependency injection for getAudioUri implementation 2020-03-07 21:43:51 -05:00
toasted-nutbread
e048a1efce Use AudioSystem in Display 2020-03-07 21:42:18 -05:00
siikamiika
967e99b7f6 ensure Backend prepare in other places 2020-03-02 04:51:45 +02:00
toasted-nutbread
46fee07d36 Fix audio buttons not being hidden properly 2020-03-01 14:51:39 -05:00
toasted-nutbread
359eabb26e Move event handler definitions 2020-02-26 19:48:30 -05:00
toasted-nutbread
fa385aafa4 Fix noteUsesScreenshot not checking mode 2020-02-25 22:24:22 -05:00
toasted-nutbread
b391704f3d Use for of 2020-02-25 22:13:06 -05:00
toasted-nutbread
798517cdf1 Use for of 2020-02-25 22:11:58 -05:00
siikamiika
ffad78f7d4 temporarily disable navigation header mouse wheel
Unblock release #355, #376
2020-02-24 08:57:48 +02:00
toasted-nutbread
070ae70f7c Create EventListenerCollection class 2020-02-16 18:47:57 -05:00
toasted-nutbread
217bd36abc Use consistent timeout for both setContentTerms and setContentKanji 2020-02-15 20:36:46 -05:00
toasted-nutbread
c5cbf99e89 Use promiseTimeout instead of delay 2020-02-15 20:35:51 -05:00
toasted-nutbread
496d2599ea Move error handling for apiDefinitionsAddable 2020-02-15 20:33:20 -05:00
toasted-nutbread
faf15c08aa Rename optionsUpdate event to optionsUpdated
Past tense better indicates that the options were changed, but no data
is being included as part of the event. It is also more consistent with
the other event names the yomichan object currently provides.
2020-02-14 22:34:44 -05:00
toasted-nutbread
853faaf48c
Merge pull request #358 from toasted-nutbread/general-refactoring
General refactoring
2020-02-14 21:25:25 -05:00
siikamiika
548c67ef1c remove extra setContentToken check from Display 2020-02-14 23:17:21 +02:00
siikamiika
c09a3ded1d
Merge pull request #357 from siikamiika/simplify-display-prepare
Simplify display prepare
2020-02-14 11:00:36 +02:00
toasted-nutbread
483f7401b7 Validate bounds of Display.definitions before using 2020-02-13 20:50:31 -05:00
toasted-nutbread
75fbb1565c Use Map for audioGetFromSources's cache parameter 2020-02-13 20:50:30 -05:00
siikamiika
d7e1ef01d8 use Promise.all to await dependencies 2020-02-13 16:26:45 +02:00
siikamiika
8abab28c4d remove isPrepared check 2020-02-13 14:36:32 +02:00
siikamiika
df37acd17f rename display initialize methods to prepare 2020-02-13 01:59:26 +02:00
siikamiika
93eaee9765 simplify DisplayGenerator initialization 2020-02-13 01:43:01 +02:00
toasted-nutbread
4629fb3639 Change no-undef from off to error 2020-02-11 22:22:16 -05:00
siikamiika
8eac191c97 prevent unwanted wheel events on history bar 2020-02-05 14:19:48 +02:00
siikamiika
b8326138a3 add scannable tags for expression and reading 2020-02-02 13:57:30 +02:00
siikamiika
24690ceb7c fix glossary item selector 2020-02-02 13:44:08 +02:00
siikamiika
dd019ecf68 fix audio index in resultOutputMode = 'merge' 2020-01-27 23:24:34 +02:00
toasted-nutbread
6c344b2740 Fix incorrect selector 2020-01-16 22:39:26 -05:00
toasted-nutbread
d4296a34cc Fix scroll position when header is visible 2020-01-16 22:39:26 -05:00
toasted-nutbread
7686e56c00 Move display templates into a single file 2020-01-16 22:39:26 -05:00
toasted-nutbread
d512c111f6 Update how content display is changed 2020-01-16 22:39:26 -05:00
toasted-nutbread
97f7df3302 Don't use document fragment 2020-01-16 22:39:26 -05:00
toasted-nutbread
7a6f85879e Update content assignment to use unique token 2020-01-16 22:39:26 -05:00
toasted-nutbread
dbbcfa5739 Only use Display.setContent 2020-01-16 22:39:26 -05:00
toasted-nutbread
24832be636 Update how spinner visibility is controlled 2020-01-16 22:39:26 -05:00
toasted-nutbread
56ee7f8df4 Update display content generation to use HTML templates 2020-01-16 22:39:26 -05:00
toasted-nutbread
0d7ccf25b8 Update license info URL 2020-01-01 12:00:31 -05:00
toasted-nutbread
899ef167d1 Update copyright 2020-01-01 12:00:00 -05:00
toasted-nutbread
2a95f1420f Move optionsUpdate message handler into Yomichan class 2019-12-20 13:36:54 -05:00
toasted-nutbread
cab2a39981 Simplify options passed to docRangeFromPoint 2019-12-17 20:56:32 -05:00
toasted-nutbread
a9c4ce724c Update display key handlers 2019-12-13 23:11:56 -05:00
toasted-nutbread
a2263e5729 Update display message handlers 2019-12-13 23:11:56 -05:00
siikamiika
e99c8c40a1 navigate history with wheel only over buttons 2019-12-07 17:41:14 +02:00
siikamiika
d8935b6aa9 fix serialization errors on Chrome 2019-12-04 21:49:51 +02:00
Alex Yatskov
a24146538c
Merge pull request #291 from toasted-nutbread/cloze-fixes
Cloze fixes
2019-12-03 14:19:33 -08:00
siikamiika
403b86675d fix entry scroll index 0 bug
Introduced in 4e7d08ff2c because the
range-limited index value isn't kept in the same scope.
2019-12-01 15:03:37 +02:00
siikamiika
abe70e3b8c always update current position on term lookup 2019-12-01 06:08:05 +02:00
siikamiika
5929018fac move Display context to a new class 2019-12-01 05:38:23 +02:00
siikamiika
be23ad7213 remove dead code 2019-11-30 04:59:36 +02:00
siikamiika
ff9510356e rewrite history as a doubly linked list 2019-11-30 04:49:37 +02:00
siikamiika
8a94d186c3 fix context type inconsistencies 2019-11-29 01:36:14 +02:00
siikamiika
1dd88763de clear Display history on new lookup 2019-11-28 18:24:24 +02:00
siikamiika
f1ecb4cd39 correct X scroll direction for history navigation 2019-11-28 15:54:55 +02:00
siikamiika
86ff831600 preventDefault correctly 2019-11-28 15:24:00 +02:00
siikamiika
beea89a421 store popped context history in Display 2019-11-28 15:20:18 +02:00
siikamiika
4e7d08ff2c set current entry even when disableScroll is true 2019-11-28 13:22:47 +02:00
siikamiika
e37ffb6cf5 fix scroll issues in Display.entryScrollIntoView
- Save scroll context before scrolling to top
- Explicit null check for scroll param to handle scrolling to y=0
correctly
2019-11-28 12:38:25 +02:00
toasted-nutbread
acb70f126c Update unused arguments 2019-11-26 22:06:27 -05:00
toasted-nutbread
943350a1f6 Use single quotes 2019-11-26 22:06:27 -05:00
toasted-nutbread
0aed27b66d Replace hasOwnProperty with simplified hasOwn function 2019-11-26 22:06:27 -05:00
toasted-nutbread
4110a848f5 Move additional utility functions to DOM 2019-11-26 18:59:52 -05:00
toasted-nutbread
3a7ef6c560 Simplify clozeBuild 2019-11-26 12:35:17 -05:00
toasted-nutbread
afddec66eb Update cloze.body to use original sentence text 2019-11-26 12:35:17 -05:00
toasted-nutbread
befee9ceca Pass kanji character to clozeBuild 2019-11-26 12:35:17 -05:00
toasted-nutbread
cb9f9b585a Update how source terms are navigated 2019-11-26 12:31:20 -05:00
toasted-nutbread
c7cb1b3d9e Require context for setContentTerms and setContentKanji 2019-11-26 12:31:17 -05:00
siikamiika
408aa73cce fix default params for term clicking 2019-11-23 17:43:30 +02:00
siikamiika
c35a05cd62 add kana to text 2019-11-23 17:40:52 +02:00
siikamiika
f63e8e4be0 add simple query parser 2019-11-23 16:56:10 +02:00
toasted-nutbread
3a225c3f91 Add details field to apiTermsFind 2019-11-10 14:02:43 -05:00
toasted-nutbread
d9b4404075 Create functions for the cases of isMouseButton
jshint was showing a warning that there was no break statement
after the first case, which there doesn't need to be.

The most straightforward way to fix this without using the unclear
// jshint ignore:line
is to just have two functions.

This change also updates invocations of isMouseButton to use
the exact case function, as this will remove the need to check
the case of mosueEvent.type. This was done because onMouseMove
is invoked at a high frequency.
2019-11-10 14:00:44 -05:00
toasted-nutbread
d6cdd693c8 Fix several warnings about name conflicts 2019-11-10 13:55:37 -05:00
toasted-nutbread
6f53030469 Use for of loop instead of forEach 2019-11-10 12:25:28 -05:00
siikamiika
83460bcdad refactoring and optimization 2019-11-04 02:15:33 +02:00
siikamiika
f4a987912a prevent accidental lookup on glossary text select 2019-11-03 18:56:22 +02:00
siikamiika
a716a52cab make non-hotkey keys focus input on search page
The issue was that scanning on search page introduced a way to lose
focus of the query input, and the new feature that the search page
hotkey focuses an existing search page instead of opening a new one made
it more obvious.

Now every key that isn't a hotkey focuses the query input, and typing
text into the box scrolls it into view in case it wasn't there when
searching.

There is an accessibility issue that this can cause, because now tab
also focuses the query input before it focuses the next element. I
didn't implement a workaround for that because it would have been more
complicated than this simple fix.

Fixes #263
2019-10-26 01:26:56 +03:00
toasted-nutbread
dbec4bffda Make the search button reuse an open search tab if it exists 2019-10-19 22:28:23 -04:00
toasted-nutbread
598cd32946 Update *show* APIs to unified showContent and setContent 2019-10-17 18:40:43 -04:00
toasted-nutbread
7bae3824e7 Add support for text-to-speech playback 2019-10-13 12:21:19 -04:00
toasted-nutbread
54d4c65854 Rename audioGetFromSources's createAudioObject argument to download 2019-10-13 12:20:56 -04:00
toasted-nutbread
883226b045 Update how custom CSS is applied 2019-10-12 19:00:24 -04:00