Skip to content

Commit

Permalink
fix: overhaul text lookup
Browse files Browse the repository at this point in the history
Rewrite text lookup to be more thorough and robust.

Fixes #990.

Also improves performance and allows looking up `user-select: all` text
in Firefox.
  • Loading branch information
birtles committed Apr 15, 2023
1 parent 06b0ade commit 7b50e67
Show file tree
Hide file tree
Showing 10 changed files with 1,126 additions and 823 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ app.

## [Unreleased]

- Rewrote text lookup to better handle cases of hidden content (including
`user-select: all` content), avoid lingering popups, and improve performance
(Fixes [#990](https://github.com/birchill/10ten-ja-reader/issues/990)).
- (Chrome, Edge) Migrated to Manifest version 3.
- (Chrome, Edge, Safari) Fixed a bug where overlays would be broken on
[MangaDex](https://mangadex.org/)
Expand Down
2 changes: 1 addition & 1 deletion src/content/gdocs-canvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { HighlightStyle } from '../common/content-config-params';
import { empty, SVG_NS } from '../utils/dom-utils';
import { Point, Rect } from '../utils/geometry';

import { CursorPosition } from './get-text';
import { CursorPosition } from './get-cursor-position';

export function injectGdocsStyles() {
removeGdocsStyles();
Expand Down
Loading

0 comments on commit 7b50e67

Please sign in to comment.