From b0f6c41f5dc7f498f2948f846dd273bcb1bc1f0b Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Mon, 27 Sep 2021 19:07:28 -0400 Subject: Search query offset value (#1968) * Add type property to TextSource* classes * Use type property rather than instanceof * Expose a sentence offset value * Use offset added to URL * Improve fallback sentence for Anki note context --- ext/js/dom/text-source-range.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ext/js/dom/text-source-range.js') diff --git a/ext/js/dom/text-source-range.js b/ext/js/dom/text-source-range.js index 377016da..591429da 100644 --- a/ext/js/dom/text-source-range.js +++ b/ext/js/dom/text-source-range.js @@ -29,6 +29,10 @@ class TextSourceRange { this._imposterSourceElement = imposterSourceElement; } + get type() { + return 'range'; + } + get range() { return this._range; } -- cgit v1.2.3