Commit Graph

64 Commits

Author SHA1 Message Date
toasted-nutbread
be7fa57d5c Add support for a popup preview 2019-10-12 15:44:32 -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
194615ef21 Make popups store options 2019-10-12 15:31:29 -04:00
toasted-nutbread
cc72514ce6 Frontend updates 2019-10-11 23:24:51 -04:00
toasted-nutbread
c5d6b9452d Create utility function for logging errors 2019-10-08 22:38:05 -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
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
7d15213916 Use static object for frontend message handlers 2019-10-02 20:31:42 -04:00
toasted-nutbread
861474d2fc Fix inconsistent return type 2019-10-01 19:05:30 -04:00
toasted-nutbread
25a4dafd73 Fix tab focus being changed due to settings changes 2019-09-29 16:48:28 -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
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
dcfe722ba6 Add support for using optionsContext to select which profile to use 2019-09-18 19:14:04 -04: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
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
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
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
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
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
5c4614f585 Add support for showing recursive popups 2019-09-02 19:31:42 -04:00
toasted-nutbread
171e3f1097 Add option for enabling deep scanning 2019-09-02 11:43:48 -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
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
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
toasted-nutbread
0f0adf750c Add ability to save screenshot to anki cards 2019-08-15 19:39:58 -04: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
toasted-nutbread
884be644ec Make error loging unintrusive
This alert can show up under normal use circumstances on mobile
2019-05-04 13:02:56 -04:00
toasted-nutbread
0b8ae6c53a Update frontend.js 2019-02-20 22:05:07 -05:00
toasted-nutbread
01f611d189 Add support for touch input 2019-02-10 20:44:16 -05:00
guidocella
15b93060c7 Add option to play audio automatically 2017-12-16 19:56:53 +01:00