aboutsummaryrefslogtreecommitdiff
path: root/ext/js/language
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/language')
-rw-r--r--ext/js/language/text-scanner.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/js/language/text-scanner.js b/ext/js/language/text-scanner.js
index fdc33400..249a2eda 100644
--- a/ext/js/language/text-scanner.js
+++ b/ext/js/language/text-scanner.js
@@ -16,6 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+import {ThemeController} from '../app/theme-controller.js';
import {EventDispatcher} from '../core/event-dispatcher.js';
import {EventListenerCollection} from '../core/event-listener-collection.js';
import {log} from '../core/log.js';
@@ -478,6 +479,11 @@ export class TextScanner extends EventDispatcher {
this.setCurrentTextSource(textSource);
this._selectionRestoreInfo = selectionRestoreInfo;
+ /** @type {ThemeController} */
+ this._themeController = new ThemeController(document.documentElement);
+ this._themeController.prepare();
+ const pageTheme = this._themeController.computeSiteTheme();
+
this.trigger('searchSuccess', {
type,
dictionaryEntries,
@@ -486,6 +492,7 @@ export class TextScanner extends EventDispatcher {
textSource,
optionsContext,
detail,
+ pageTheme,
});
} else {
this._triggerSearchEmpty(inputInfo);