Commit Graph

38 Commits

Author SHA1 Message Date
toasted-nutbread
1184320e3e
Button and image scanning (#705)
* Update TextSourceElement.equals check to match TextSourceRange.equals

* Force full query to be visible when scanning buttons or images with more text

* Update style of query parser
2020-08-02 18:59:35 -04:00
toasted-nutbread
e23504613f
Use DOMTextScanner (#536)
* Use DOMTextScanner instead of TextSourceRange.seek*

* Move getNodesInRange to dom.js

* Move anyNodeMatchesSelector to dom.js

* Remove unused functions

* Update tests

* Add layoutAwareScan option

* Use layoutAwareScan for source and sentence scanning

* Remove unused IGNORE_TEXT_PATTERN
2020-06-21 16:07:51 -04:00
toasted-nutbread
5752b23a8e
Text source refactor (#527)
* Update TextSourceElement API to have parity with TextSourceRange

* Make fields private

* Update equality check

* Fix "this.element" being used instead of just "element"
2020-05-10 14:06:25 -04:00
toasted-nutbread
6eafdac362
Fix setStartOffset not appending (#526) 2020-05-09 21:09:23 -04:00
toasted-nutbread
d6ae322961
Text scanning update (#507)
* Fix unity test missing a parameter

* Update docSentenceExtract to not rescan content
2020-05-06 19:34:32 -04:00
toasted-nutbread
d581bffa15
Style fixes (#494)
* Place multi-line expression parentheses on the correct line

* Add function-paren-newline eslint rule

* Add some additional eslint rules
2020-05-02 13:04:17 -04:00
toasted-nutbread
51032d1eca
Catch WrongDocumentError thrown by compareBoundaryPoints (#491)
* Catch WrongDocumentError thrown by compareBoundaryPoints

* Filter error based on name
2020-05-02 12:59:59 -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
53220af68e Don't use innerHTML 2020-02-23 11:49:52 -05:00
toasted-nutbread
10ec165f14 Check type of other for equals functions
Fixes #361
2020-02-15 20:52:21 -05:00
toasted-nutbread
1f3ff6fad0 Fix equals function on TextSourceRange when imposter elements are used 2020-01-26 10:31:17 -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
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
943350a1f6 Use single quotes 2019-11-26 22:06:27 -05:00
toasted-nutbread
fa963722a7 Fix seekForward and seekBackward not handling length=0 case correctly 2019-11-08 19:24:33 -05:00
siikamiika
5b98f3ea6e add missing return to fix vertical text mode 2019-10-16 23:49:40 +03:00
toasted-nutbread
c92fc11fcd Fix getElementWritingMode returning deprecated values on Edge 2019-10-13 16:44:13 -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
073420a121 Normalize XHTML document node.nodeNode to upper case 2019-09-15 16:09:46 -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
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
fad5332488 Move static DOM scanning functions into TextSourceRange 2019-09-02 19:33:52 -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
ad0dca7bb1 Make the imposter element tracked using TextSourceRange 2019-08-31 14:57:50 -04:00
toasted-nutbread
68af0d86c3 Improve popup position for vertical text 2019-08-31 11:57:07 -04:00
siikamiika
39b2456ce9 fix off by one error 2019-08-19 19:47:45 +03: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
9280985306 add option to automatically hide search results (fixes #71) 2017-09-16 23:08:43 -07:00
3362a68e06 frontend cleanup 2017-08-15 20:04:15 -07:00
8b50dfe1e9 unify files 2017-08-13 21:11:10 -07:00