diff options
author | siikamiika <siikamiika@users.noreply.github.com> | 2019-12-07 15:20:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-07 15:20:28 +0200 |
commit | df06251cb024a285c6ef27bf6b5dfc907afaef84 (patch) | |
tree | 1238fed12525ad4b8ac15357322c1601f426fea4 /ext/bg | |
parent | d1950bc5f1a3cc737bbb43418738f5da7955ee7f (diff) | |
parent | f6d0503604e66ef89578332f6adb477606dc81f9 (diff) |
Merge pull request #299 from siikamiika/frontend-extract-text-scanner
Extract text scanner from Frontend
Diffstat (limited to 'ext/bg')
-rw-r--r-- | ext/bg/js/search-frontend.js | 1 | ||||
-rw-r--r-- | ext/bg/js/search-query-parser.js | 2 | ||||
-rw-r--r-- | ext/bg/search.html | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/ext/bg/js/search-frontend.js b/ext/bg/js/search-frontend.js index 6ba8467e..e21dc371 100644 --- a/ext/bg/js/search-frontend.js +++ b/ext/bg/js/search-frontend.js @@ -33,6 +33,7 @@ async function searchFrontendSetup() { window.frontendInitializationData = {depth: 1, ignoreNodes, proxy: false}; const scriptSrcs = [ + '/mixed/js/text-scanner.js', '/fg/js/frontend-api-receiver.js', '/fg/js/popup.js', '/fg/js/popup-proxy-host.js', diff --git a/ext/bg/js/search-query-parser.js b/ext/bg/js/search-query-parser.js index 8dc2e30a..1c583bf1 100644 --- a/ext/bg/js/search-query-parser.js +++ b/ext/bg/js/search-query-parser.js @@ -62,7 +62,7 @@ class QueryParser { const scanningOptions = this.search.options.scanning; const scanningModifier = scanningOptions.modifier; if (!( - Frontend.isScanningModifierPressed(scanningModifier, e) || + TextScanner.isScanningModifierPressed(scanningModifier, e) || (scanningOptions.middleMouse && DOM.isMouseButtonDown(e, 'auxiliary')) )) { return; diff --git a/ext/bg/search.html b/ext/bg/search.html index 58bb9ba8..7b4616da 100644 --- a/ext/bg/search.html +++ b/ext/bg/search.html @@ -74,6 +74,7 @@ <script src="/mixed/js/display.js"></script> <script src="/mixed/js/japanese.js"></script> <script src="/mixed/js/scroll.js"></script> + <script src="/mixed/js/text-scanner.js"></script> <script src="/bg/js/search-query-parser.js"></script> <script src="/bg/js/search.js"></script> |