toasted-nutbread
e73e4c032c
Implement scale relative to visual viewport
2020-01-22 20:38:21 -05:00
toasted-nutbread
4d85a36091
Fix popup size changing when zooming
2020-01-22 20:38:21 -05:00
toasted-nutbread
351598a182
Add settings to control popup content scale
2020-01-22 20:38:21 -05:00
toasted-nutbread
e740965d4f
Scale popup based on current page zoom factor
2020-01-22 20:38:21 -05:00
toasted-nutbread
22afab2f47
Remove _isInitialized
2020-01-22 20:38:21 -05:00
toasted-nutbread
e51fd8ea71
Add _isInjectedAndLoaded property
2020-01-22 20:38:21 -05:00
toasted-nutbread
f725549330
Remove redundant window resize handler
2020-01-22 20:38:21 -05:00
toasted-nutbread
14e48cf854
Create single function for how the frontend shows popup content
2020-01-22 20:38:21 -05:00
toasted-nutbread
d8b0d5267b
Catch exception on range.setStart
...
Fixes #328
2020-01-17 20:47:51 -05:00
toasted-nutbread
f969b5b8a9
Update popup scan ignore selectors
2020-01-16 22:39:26 -05:00
toasted-nutbread
62da7ec5cc
Update expression-scan-toggle to term-expression-text
2020-01-16 22:39:26 -05:00
toasted-nutbread
dbbcfa5739
Only use Display.setContent
2020-01-16 22:39:26 -05:00
siikamiika
8292be92d8
use TextScanner in QueryParser
2020-01-16 23:22:38 +02: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
362e317a5d
Change FrontendApiSender.callbacks to be a map
2019-12-21 14:30:13 -05:00
toasted-nutbread
a2175f2c29
Move PopupProxyHost initialization
2019-12-21 13:27:32 -05:00
toasted-nutbread
7ae0584077
Update initialization
2019-12-21 13:19:31 -05:00
toasted-nutbread
b2cc694d95
Replace window.yomichan_display with DisplayFloat.instance
2019-12-20 23:20:42 -05:00
toasted-nutbread
8c236cca44
Remove unused yomichan_frontend
2019-12-20 23:20:22 -05:00
toasted-nutbread
2519f99f54
Update how orphan state is observed
2019-12-20 13:44:33 -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
4b5138b96e
Override pointer-events with important
2019-12-17 20:54:57 -05:00
toasted-nutbread
ff1f256ffa
Only return unique elements from docElementsFromPoint
...
This fixes #294
2019-12-17 20:53:12 -05:00
toasted-nutbread
9557d8048b
Fix undefined reference
2019-12-16 19:54:41 -05:00
toasted-nutbread
68a0293867
Make PopupProxy functions async enabled status match Popup
2019-12-16 19:54:41 -05:00
toasted-nutbread
d6c64643b1
Don't return promises for frontend message handlers
2019-12-16 19:54:41 -05:00
toasted-nutbread
0fb2357ec7
isVisibleAsync => isVisible
2019-12-16 19:54:41 -05:00
toasted-nutbread
29734ea6e9
isVisible => isVisibleSync
2019-12-16 19:54:41 -05:00
toasted-nutbread
72ab6f1f45
Remove unused child getter
2019-12-16 19:54:41 -05:00
toasted-nutbread
801df8000f
Mark private members
2019-12-16 19:54:41 -05:00
toasted-nutbread
7c68490d2e
Add setParent to popup
2019-12-16 19:54:41 -05:00
toasted-nutbread
30e13354b3
Add Popup.isProxy
2019-12-16 19:54:41 -05:00
toasted-nutbread
289a1849c4
Add _createPopupInternal to return both popup and new ID
2019-12-16 19:54:41 -05:00
toasted-nutbread
41fadfd0a9
Add setChildrenSupported to popup
2019-12-16 19:54:41 -05:00
toasted-nutbread
c4719cb7f4
Add getContainer to popup
2019-12-16 19:54:41 -05:00
toasted-nutbread
4ba93b0770
Add getContainerRect to popup
2019-12-16 19:54:41 -05:00
toasted-nutbread
37da5fef59
Move container definition
2019-12-16 19:54:41 -05:00
toasted-nutbread
c3ea952844
Mark private functions
2019-12-16 19:54:41 -05:00
toasted-nutbread
44bde5c676
Reorganize popup-only public functions
2019-12-16 19:54:41 -05:00
toasted-nutbread
4014bbab42
Reorganize popup public functions to match popup proxy
2019-12-16 19:54:41 -05:00
toasted-nutbread
8164ccfbfc
Group poup static functions together
2019-12-16 19:54:41 -05:00
toasted-nutbread
fab0d70358
Move popup public properties
2019-12-16 19:54:41 -05:00
toasted-nutbread
2c3a145866
Mark private members
2019-12-16 19:54:41 -05:00
toasted-nutbread
8a127e07f3
Mark private message handlers
2019-12-16 19:54:41 -05:00
toasted-nutbread
525a3a50d1
Mark private functions
2019-12-16 19:54:41 -05:00
toasted-nutbread
2c8c6866ef
jsonRectToDOMRect => convertJsonRectToDOMRect
...
Also make static
2019-12-16 19:54:41 -05:00
toasted-nutbread
3f8cc83c25
Group nested message handlers together
2019-12-16 19:54:41 -05:00
toasted-nutbread
88ac8f4ead
Update PopupProxyHost.popups to use a Map
2019-12-16 19:54:41 -05:00
toasted-nutbread
8efbf9bd0d
Flag members as private
2019-12-16 19:54:41 -05:00
toasted-nutbread
bf02eb2ea1
Mark PopupProxy internal functions as private
2019-12-16 19:54:41 -05:00
toasted-nutbread
ce51fe7eca
Use a single api.js
2019-12-13 23:11:56 -05:00
toasted-nutbread
7addf5a2dd
Add API calls for optionsGetFull and optionsSave
2019-12-13 23:11:56 -05:00
toasted-nutbread
4177b63726
Remove redundant getUrl handlers
2019-12-13 23:11:56 -05:00
toasted-nutbread
573f83b65a
Update frontend API receiver handlers
2019-12-13 23:11:56 -05:00
toasted-nutbread
b7144ed879
Update display float key handlers
2019-12-13 23:11:56 -05:00
toasted-nutbread
5588643988
Update float message handlers
2019-12-13 23:11:56 -05:00
toasted-nutbread
863e36e829
Update frontend message handlers
2019-12-13 23:11:56 -05:00
toasted-nutbread
f287d68624
Add showContentCompleted for improved semantic clarity
2019-12-11 21:31:21 -05:00
siikamiika
f6d0503604
simplify with inheritance
2019-12-06 21:39:29 +02:00
siikamiika
595636c40b
move text selection to TextScanner
2019-12-05 22:48:05 +02:00
siikamiika
e5be42d3de
scan decoupling
2019-12-05 22:12:43 +02:00
siikamiika
02a34bb4bc
initial text scanner extract
2019-12-05 03:58:35 +02:00
siikamiika
a40f3b1c9f
add missing disableHistory
2019-12-01 06:32:17 +02:00
siikamiika
be23ad7213
remove dead code
2019-11-30 04:59:36 +02:00
siikamiika
1dd88763de
clear Display history on new lookup
2019-11-28 18:24:24 +02:00
toasted-nutbread
5a1046bc90
Update arrow-parens to always
2019-11-26 22:06:27 -05:00
toasted-nutbread
acb70f126c
Update unused arguments
2019-11-26 22:06:27 -05:00
toasted-nutbread
ef833d2bea
Use const rather than let where possible
2019-11-26 22:06:27 -05:00
toasted-nutbread
527595f79b
Remove unnecessary escapes from regex literals
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
96aad50340
Create DOM utility file
2019-11-26 18:59:52 -05:00
toasted-nutbread
a14b820a19
Move utilInvoke into api.js, rename to _apiInvoke
2019-11-26 17:23:55 -05:00
toasted-nutbread
7f9a73135d
Remove utilAsync
2019-11-26 17:18:17 -05:00
siikamiika
3423ed7d67
Merge pull request #279 from siikamiika/query-parser-1
...
Search page query parser
2019-11-26 18:31:35 +02:00
toasted-nutbread
820beb7c93
Fix incorrect opacity check
2019-11-25 21:04:34 -05:00
toasted-nutbread
cf18e3b42e
Replace string.substr and string.slice with string.substring
...
Improves semantic clarity, and it's recommended to not use substr.
2019-11-24 11:02:52 -05:00
siikamiika
41020289ab
add mecab support
2019-11-23 17:45:44 +02:00
siikamiika
c35a05cd62
add kana to text
2019-11-23 17:40:52 +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
siikamiika
40c8268fd6
always disable scanning IME checkbox label
2019-11-09 13:01:21 +02:00
siikamiika
25af532ab7
enable expression scan toggling on search page
2019-11-09 12:27:09 +02:00
toasted-nutbread
fa963722a7
Fix seekForward and seekBackward not handling length=0 case correctly
2019-11-08 19:24:33 -05:00
toasted-nutbread
a85ec440d6
Fix overlapping popup timers
2019-11-05 19:48:08 -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
toasted-nutbread
75ff05148d
Fix autoHideResults not working
2019-11-03 11:06:31 -05:00
toasted-nutbread
bcffe80a1e
Group similar functions together
2019-10-28 17:03:42 -04:00
toasted-nutbread
6d85dae68d
Fix some issues with the context menu
2019-10-28 17:03:42 -04:00
toasted-nutbread
d2644c0776
Style update
2019-10-28 17:03:42 -04:00
toasted-nutbread
c365101ec2
Reset preventions earlier
2019-10-28 17:03:42 -04:00
toasted-nutbread
e542f38110
Check pendingLookup earlier
2019-10-28 17:03:42 -04:00
toasted-nutbread
9703e123bf
Remove setPrimaryTouch
2019-10-28 17:03:42 -04:00
toasted-nutbread
80eb357527
Simplify touch event implementation
2019-10-28 17:03:42 -04:00
toasted-nutbread
131dc8397d
Make selectionContainsPoint static
2019-10-28 17:03:42 -04:00
toasted-nutbread
a648e05091
Improve naming
2019-10-28 17:03:42 -04:00
toasted-nutbread
9178636613
Remove setters
2019-10-28 17:03:42 -04:00
toasted-nutbread
c74c466c36
Remove unused variable
2019-10-28 17:03:42 -04:00
toasted-nutbread
f2dec4ca20
Remove searchFromTouch
2019-10-28 17:03:42 -04:00
toasted-nutbread
8c5240d7a6
Simplify how touch events use onAfterSearch
2019-10-28 17:03:42 -04:00
toasted-nutbread
e91bcf5f55
Rename textSourceLast to textSourceCurrent
2019-10-28 17:03:42 -04:00
toasted-nutbread
be27781c15
Update how definitions are searched for
2019-10-28 17:03:42 -04:00
toasted-nutbread
f927f806ba
Move check
2019-10-28 17:03:42 -04:00
toasted-nutbread
1f0a434e96
Remove unused vars
2019-10-28 17:03:42 -04:00
toasted-nutbread
dcb6f68826
Don't pass null textSource into searchSource
2019-10-28 17:03:42 -04:00
toasted-nutbread
185963899b
Use promiseTimeout
2019-10-28 17:03:42 -04:00
toasted-nutbread
d608657495
Move onError catch into searchAt
2019-10-28 17:03:42 -04:00
siikamiika
70418202cf
make search page checkbox options persist
2019-10-27 20:11:23 +02:00
siikamiika
48776145d6
add workaround to Chrome clipboard.readText
...
For some reason this doesn't work on Firefox, so keep using the new API
for Firefox
2019-10-27 15:46:27 +02:00
toasted-nutbread
7a3315d75d
Use chrome.runtime.getURL instead of chrome.extension.getURL
2019-10-22 20:23:03 -04:00
toasted-nutbread
d9ae34821c
Add support for middle clicks opening new tabs on the context buttons
2019-10-19 22:30:16 -04: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
a5d7de8e97
Add correction to offset of imposter rect
...
Necessary when dealing with CSS transforms
2019-10-17 19:30:54 -04:00
toasted-nutbread
8f918c63dc
Reposition popup on window resize rather than clear the search
...
Fixes #107
2019-10-17 18:40:43 -04:00
toasted-nutbread
598cd32946
Update *show* APIs to unified showContent and setContent
2019-10-17 18:40:43 -04:00
siikamiika
5b98f3ea6e
add missing return to fix vertical text mode
2019-10-16 23:49:40 +03:00
toasted-nutbread
16521fec93
Assign first popup on the search page as a depth of 1
2019-10-15 20:23:25 -04:00
toasted-nutbread
cb236a7430
Add apiGetEnvironmentInfo function
2019-10-13 17:20:55 -04:00
toasted-nutbread
c92fc11fcd
Fix getElementWritingMode returning deprecated values on Edge
2019-10-13 16:44:13 -04:00
toasted-nutbread
b34ff7ebe9
Change #yomichan-float to .yomichan-float
...
Since there can be more than one popup, using a class makes more sense than an ID.
2019-10-13 12:12:52 -04:00
toasted-nutbread
c9158a37b5
Allow outer popup stylesheets to be injected
2019-10-13 12:12:51 -04:00
toasted-nutbread
118f200500
Simplified how the auto theme works
2019-10-13 12:12:51 -04:00
toasted-nutbread
b086fca69f
Add separate theme option for outer popup style
2019-10-12 19:00:24 -04:00
toasted-nutbread
883226b045
Update how custom CSS is applied
2019-10-12 19:00:24 -04:00
toasted-nutbread
c90bc75eb8
Create themes
2019-10-12 19:00:24 -04:00
toasted-nutbread
be7fa57d5c
Add support for a popup preview
2019-10-12 15:44:32 -04:00
toasted-nutbread
537d2ef532
Remove Display.dependencies
2019-10-12 15:31:29 -04:00
toasted-nutbread
6da7683552
Don't pass options around for calls to termsShow, kanjiShow, etc.
2019-10-12 15:31:29 -04:00
toasted-nutbread
a5b208fb89
Check if objects are properly initialized before showing content
2019-10-12 15:31:29 -04:00
toasted-nutbread
8a1637f6b3
Remove .show popup proxy API since it's not used
2019-10-12 15:31:29 -04:00
toasted-nutbread
194615ef21
Make popups store options
2019-10-12 15:31:29 -04:00
toasted-nutbread
3e249e19ac
Update Display initialization process
2019-10-12 15:31:29 -04:00
toasted-nutbread
cc72514ce6
Frontend updates
2019-10-11 23:24:51 -04:00
toasted-nutbread
22b218d172
Pass optionsContext to audioBuildUrl handlers
2019-10-09 22:03:56 -04:00
toasted-nutbread
c5d6b9452d
Create utility function for logging errors
2019-10-08 22:38:05 -04:00
toasted-nutbread
6a6e200ef9
Update rejections to use Error
2019-10-08 21:44:25 -04:00
toasted-nutbread
88de427184
Throw Error instead of string
2019-10-08 21:32:08 -04:00
Alex Yatskov
4df8662ea9
Merge pull request #234 from toasted-nutbread/remove-frontend-event-listeners
...
Remove event listeners when scanning is disabled
2019-10-05 19:48:46 -07:00
toasted-nutbread
113cc725c1
Make the window.onresize handler not change focus
2019-10-05 22:11:05 -04:00
toasted-nutbread
cd6d4e7ee1
Update how popup visibility works
2019-10-05 21:59:37 -04:00
toasted-nutbread
2255fadf52
Rename Popup.setVisible to setVisibleOverride
2019-10-05 21:40:10 -04:00
toasted-nutbread
c967b7a9f1
Remove event listeners when scanning is disabled
2019-10-05 13:57:33 -04:00
Alex Yatskov
46ab36180f
Merge pull request #233 from toasted-nutbread/static-handlers
...
Static handlers
2019-10-05 09:20:45 -07:00
toasted-nutbread
fa7ee468c0
Simplify float initialization
2019-10-02 21:12:24 -04:00
toasted-nutbread
bf382652a7
Use static object for float message handlers
2019-10-02 20:46:35 -04:00
toasted-nutbread
7d15213916
Use static object for frontend message handlers
2019-10-02 20:31:42 -04:00
toasted-nutbread
a628610cbd
Use KeyboardEvent.key for onKeyDown handlers
2019-10-02 19:49:52 -04:00
toasted-nutbread
861474d2fc
Fix inconsistent return type
2019-10-01 19:05:30 -04:00
Alex Yatskov
fba2bef905
Merge pull request #225 from toasted-nutbread/text-source-range-improvements
...
TextSourceRange improvements
2019-09-30 19:58:19 -07:00
toasted-nutbread
25a4dafd73
Fix tab focus being changed due to settings changes
2019-09-29 16:48:28 -04:00
toasted-nutbread
03c52625a9
Refactor seekForward and seekBackward
2019-09-28 11:28:55 -04:00
toasted-nutbread
a5f393fa2c
Fix incorrect check
2019-09-28 11:28:15 -04:00
toasted-nutbread
928d7aecd5
Directly return rather than use a temporary variable
2019-09-28 11:28:15 -04:00
toasted-nutbread
8110de514e
Change skipped node types to use a switch statement
2019-09-28 11:28:15 -04:00
toasted-nutbread
95a7fd81f5
Use raw element references for container and spinner
2019-09-27 21:41:00 -04:00
toasted-nutbread
476a5e873a
Remove jQuery usage from float.js
2019-09-27 21:16:10 -04:00
Alex Yatskov
ba2858309e
Merge pull request #218 from toasted-nutbread/settings-profile-conditions
...
Settings profile conditions
2019-09-23 17:03:00 -07:00
Alex Yatskov
db405ffd24
Merge pull request #219 from toasted-nutbread/fix-null-caret-position
...
Handle null return value of document.caretPositionFromPoint
2019-09-22 10:06:52 -07:00
toasted-nutbread
f022ee4eca
Use a Promise to trigger callback when delay is 0 or less
2019-09-19 19:00:26 -04:00
toasted-nutbread
02927f9004
Handle null return value of document.caretPositionFromPoint
2019-09-18 22:11:18 -04:00
toasted-nutbread
dcfe722ba6
Add support for using optionsContext to select which profile to use
2019-09-18 19:14:04 -04:00
toasted-nutbread
073420a121
Normalize XHTML document node.nodeNode to upper case
2019-09-15 16:09:46 -04:00
Alex Yatskov
e4fa658295
Merge pull request #212 from toasted-nutbread/frontend-cleanup
...
Frontend cleanup
2019-09-15 11:33:48 -07:00
Alex Yatskov
88a6128e39
Merge pull request #211 from toasted-nutbread/validate-content-window
...
Validate contentWindow before focus
2019-09-14 17:31:23 -07:00
Alex Yatskov
2add068ff2
Merge pull request #210 from toasted-nutbread/defer-port-creation
...
Defer creation of communication port until required
2019-09-14 17:30:52 -07:00
toasted-nutbread
0067dfeacc
Remove redundant call of popupTimerClear
...
Also use explicit null checks rather than truthy checks.
2019-09-14 15:29:43 -04:00
toasted-nutbread
8b1e4d1c6f
Return only single element when deepDomScan is not enabled
2019-09-14 14:52:03 -04:00
toasted-nutbread
7dddcb8dca
Rename type to cause
2019-09-14 14:31:21 -04:00
toasted-nutbread
6d3037f3d6
Remove destructuring from searchAt, containsPoint, docRangeFromPoint
2019-09-14 14:27:25 -04:00
toasted-nutbread
89941d404c
Remove unused variable
2019-09-14 14:11:25 -04:00
toasted-nutbread
721248c821
Remove mouseDownLeft and mouseDownMiddle
...
MouseEvent.buttons can be used instead.
2019-09-14 14:11:06 -04:00
toasted-nutbread
964de775df
Validate contentWindow before focus
2019-09-14 12:02:31 -04:00
toasted-nutbread
304064dae0
Defer creation of communication port until required
2019-09-14 11:58:22 -04:00
toasted-nutbread
bab6a13bfb
Fix nested popups being shown if parent is hidden
2019-09-13 18:12:51 -04:00
Alex Yatskov
ec816e6767
Merge pull request #207 from toasted-nutbread/popup-proxy-writing-mode
...
Add writingMode to PopupProxy* termsShow and kanjiShow
2019-09-12 19:48:22 -07:00
toasted-nutbread
76aa30ceba
Add writingMode to PopupProxy* termsShow and kanjiShow
2019-09-11 21:29:08 -04:00
toasted-nutbread
bc8793eb56
Add a context object for all calls to fetch options
2019-09-10 20:09:33 -04:00
toasted-nutbread
99ca60d4c1
Ensure both Popup and PopupProxy have valid depth
2019-09-10 20:09:33 -04:00
toasted-nutbread
91bc31d758
Change how options updates are handled on the frontend
...
Only an 'optionsUpdate' signal is now sent to the frontend with empty data. The frontend then responds by performing apiOptionsGet to update the options. This makes it so that there is only a single function which is responsible for requesting options from the backend.
2019-09-10 20:09:33 -04:00
Alex Yatskov
cc53510883
Merge pull request #204 from toasted-nutbread/settings-improvements
...
Settings improvements
2019-09-08 19:34:39 -07:00
toasted-nutbread
7db2c66105
Use consistent structure for params
2019-09-06 21:23:35 -04:00
toasted-nutbread
13b184707b
Remove unnecessary functions
...
apiOptionsSet not required in bg/js/api.js after optionsSave; optionsSave already invokes apiOptionsSet.
apiOptionsSet not required in fg/js/api.js since it's never invoked by the foreground.
optionsSet handler not required in bg/js/backend.js since the message is never sent by the foreground.
2019-09-06 21:23:35 -04:00
Alex Yatskov
155986db46
Merge pull request #201 from toasted-nutbread/omit-contains-point-check
...
Omit containsPoint check on searchAt
2019-09-05 19:46:43 -07:00
Alex Yatskov
6dc44e3f33
Merge pull request #202 from toasted-nutbread/temporary-object-optimization
...
Temporary object optimization
2019-09-05 19:46:14 -07:00
toasted-nutbread
5c793180d0
Omit containsPoint check on searchAt
...
The range returned by docRangeFromPoint is now guaranteed to contain the point due to the addition of isPointInRange checks.
2019-09-03 19:17:50 -04:00
toasted-nutbread
9028b55774
Fix nested popups closing when the mouse leaves the parent's rect
2019-09-03 18:55:55 -04:00
toasted-nutbread
fc4a961412
Replace some instances of Array.concat
...
.push or .unshift can accomplish the same operation without constructing new arrays.
2019-09-02 20:25:30 -04:00
toasted-nutbread
fad5332488
Move static DOM scanning functions into TextSourceRange
2019-09-02 19:33:52 -04:00
siikamiika
f4b81eff30
fix parent focus issues for Firefox and Chrome
2019-09-02 19:33:52 -04:00
siikamiika
2df9a7f977
change Popup.children to Popup.child
2019-09-02 19:33:52 -04:00
siikamiika
97be029dee
focus the site when closing multi-level popups
2019-09-02 19:33:52 -04:00
siikamiika
834f14e808
simplified if statement back to single line
2019-09-02 19:33:52 -04:00
siikamiika
3d28a3a405
prevent closing new child popup on parent mouseout
2019-09-02 19:33:52 -04:00
siikamiika
e4d302e786
focus parent popup on hide instead of blurring
2019-09-02 19:33:52 -04:00
siikamiika
87ff5cb19b
make containsPoint async everywhere
2019-09-02 19:33:52 -04:00
toasted-nutbread
71471d08e5
Add option to enable/disable scanning of source expressions in popups
2019-09-02 19:33:52 -04:00
toasted-nutbread
3491affcf1
Update nested initialization parameters passed via message rather than using the URL query string
2019-09-02 19:33:28 -04:00
toasted-nutbread
53aad0bef6
Fix messaging issues when iframes are present in the document
2019-09-02 19:33:28 -04:00
toasted-nutbread
1a9348ec27
Add option for maximum nested popup depth
2019-09-02 19:32:08 -04:00
toasted-nutbread
5c4614f585
Add support for showing recursive popups
2019-09-02 19:31:42 -04:00
toasted-nutbread
33076e9db9
Fix typo
2019-09-02 11:43:49 -04:00
toasted-nutbread
c0bf6ff033
Fix issues caused by scanning ranges which don't start with a text node
...
The rects returned by range.getClientRects() could include the entire start element's bounding box.
2019-09-02 11:43:49 -04:00
toasted-nutbread
a2139213c8
Fix issue with whitespace ranges
...
The size of the rects for these ranges will sometimes be excessively large on Firefox, leading to false positives.
2019-09-02 11:43:49 -04:00
toasted-nutbread
ee59b3ab8b
Reduce amount of isPointInRange calls for repeated ranges
2019-09-02 11:43:49 -04:00
toasted-nutbread
171e3f1097
Add option for enabling deep scanning
2019-09-02 11:43:48 -04:00
toasted-nutbread
737a5ee8a8
Allow elements behind other transparent elements to be scanned
2019-09-02 11:43:33 -04:00
toasted-nutbread
d296ebd593
Improve definition of caretRangeFromPoint
2019-09-02 11:41:00 -04:00
toasted-nutbread
548607ea7f
Destructure point to {x, y} only once
2019-09-02 11:40:21 -04:00
Alex Yatskov
3c9f7ba152
Merge pull request #196 from toasted-nutbread/vertical-text-popup-position
...
Vertical text popup position
2019-09-02 08:33:10 -07:00
toasted-nutbread
e3d7ec8db7
Create container for imposter element
...
The container will prevent the imposter element's size from affecting the document's primary scrollbars.
2019-09-01 16:06:22 -04:00
toasted-nutbread
e3e7dad2cc
Use important CSS priority for imposter element styles
2019-08-31 15:30:32 -04:00
toasted-nutbread
9b46fe70de
Fix imposter issues with <input type="text">
2019-08-31 15:10:46 -04:00
toasted-nutbread
ad0dca7bb1
Make the imposter element tracked using TextSourceRange
2019-08-31 14:57:50 -04:00
toasted-nutbread
e47e041217
Disable pointer events on hidden imposter
2019-08-31 14:57:50 -04:00
toasted-nutbread
62d66d93f7
Remove rounding
2019-08-31 14:57:50 -04:00
toasted-nutbread
9e9040178d
Fix some size and positioning issues related to imposter element
2019-08-31 14:57:49 -04:00
toasted-nutbread
85472d9407
Add option for position of popup for horizontal text
2019-08-31 11:57:09 -04:00
toasted-nutbread
68af0d86c3
Improve popup position for vertical text
2019-08-31 11:57:07 -04:00
Alex Yatskov
3bf8a9ab00
Merge pull request #193 from toasted-nutbread/fix-is-point-in-range
...
Update isPointInRange to be more accurate
2019-08-29 18:00:36 -07:00
toasted-nutbread
ea9c5ad867
Update isPointInRange to be more accurate
2019-08-29 20:35:23 -04:00
Alex Yatskov
cd75f5b97d
Merge pull request #188 from toasted-nutbread/edge-support
...
Add support for Edge browser
2019-08-28 19:41:30 -07:00
toasted-nutbread
a39a1fa9e4
Add support for Edge browser
2019-08-26 21:58:03 -04:00
toasted-nutbread
c49f3c7838
Suppress messages about unchecked runtime.lastError on Firefox Mobile
2019-08-25 11:09:10 -04:00
siikamiika
39b2456ce9
fix off by one error
2019-08-19 19:47:45 +03:00
317a7a1538
pr fixes
2019-08-17 15:42:36 -07:00
Alex Yatskov
9ec711b780
Merge pull request #176 from toasted-nutbread/selection-touch-scan-disable
...
Don't scan when touching the current selection
2019-08-17 14:12:11 -07:00
Alex Yatskov
8ebac935e8
Merge pull request #182 from toasted-nutbread/anki-screenshot
...
Anki screenshot
2019-08-17 09:05:33 -07:00
Alex Yatskov
1d25c8a744
Merge pull request #175 from toasted-nutbread/touch-move-warning-fix
...
Don't process touchmove events if they can't be canceled
2019-08-17 09:04:23 -07:00
Alex Yatskov
778d1d6e79
Merge pull request #177 from toasted-nutbread/doc-range-from-point-improvements
...
Doc range from point improvements
2019-08-17 09:04:05 -07:00
toasted-nutbread
2edd4183a0
Clean up docRangeFromPoint
...
Use a cached value for checking if the browser is Firefox.
Only validate and set up document.caretRangeFromPoint once.
Use switch for multiple comparisons on the same value.
2019-08-16 17:44:16 -04:00
toasted-nutbread
0f0adf750c
Add ability to save screenshot to anki cards
2019-08-15 19:39:58 -04:00
siikamiika
609dbf6a81
ensure that content is iterable
2019-08-15 15:35:23 +03:00
siikamiika
0a9b673e27
reimplement ignored chars inside source.js only
2019-08-15 15:28:30 +03:00
siikamiika
658e5ddff1
ignore zero-width non-joiner
...
fixes #179
2019-08-14 22:54:42 +03:00
toasted-nutbread
345b9c6f9d
Disable focus of popup when using touch
...
Context menu on Firefox will not target the text properly if the focus is on the popup window.
2019-08-09 22:29:14 -04:00
toasted-nutbread
710ffb88fc
Don't scan when touching the current selection
2019-08-09 21:45:29 -04:00
toasted-nutbread
70e9f4922b
Don't process touchmove events if they can't be canceled
...
If the event cannot be canceled, the browser will continue to scroll while looking up results, which makes it very difficult to control where the lookup cursor is. Chrome also logs error messages that this is invalid.
2019-08-09 21:38:52 -04:00
Alex Yatskov
4fd7eeff3e
Merge pull request #174 from siikamiika/fix-firefox-scanning-start-of-line
...
fix scanning start of line on Firefox
2019-08-03 19:55:26 -07:00
siikamiika
cfb5f0b9e1
fix scanning start of line on Firefox
...
On many sites, for example Twitter (posts), Yomichan doesn't match any
text from the beginning of the line unless you move the mouse cursor to
the top left corner of the word that starts from the beginning of the
line.
Apparently there were some problems related to the imposter and there
was commit 0cc5566
adding a fix for it, but this seemed to cause
problems and 542cdb2
was added to fix that. It didn't handle all of the
cases, though, so this commit is letting everything through on Firefox.
2019-08-04 01:52:27 +03:00
siikamiika
bf92430ea7
Merge branch 'master' into search-terms-from-terms
2019-08-03 22:18:53 +03:00
siikamiika
afc771de9f
inject doc functions as dependencies
2019-08-03 15:06:28 +03:00
siikamiika
0ee6d05cb1
Revert "use ES6 import and export"
...
This reverts commit 04f4607922
.
2019-08-03 14:57:17 +03:00
siikamiika
04f4607922
use ES6 import and export
2019-08-02 00:04:39 +03:00
siikamiika
b8df9896e6
allow looking up terms from within terms
...
resolves #167 , resolves #139 , resolves #75 , resolves #151
2019-08-01 02:20:09 +03:00
siikamiika
c08bcd7c56
return focus to site after hiding popup
2019-08-01 00:25:31 +03:00
toasted-nutbread
ad897713e6
Add support for custom popup CSS
2019-07-09 18:06:27 -04:00