From e4331ab90ee605e073139e20772d5ec69110ec1e Mon Sep 17 00:00:00 2001 From: Kuuuube <61125188+Kuuuube@users.noreply.github.com> Date: Fri, 14 Jun 2024 12:48:09 -0400 Subject: Add web option to profile switching keybinds (#933) * Add web option to profile switching keybinds * Fix spacing * Refactor * Fix comment on update * Make linter happy --------- Signed-off-by: Kuuuube <61125188+Kuuuube@users.noreply.github.com> --- ext/js/app/frontend.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ext/js/app') diff --git a/ext/js/app/frontend.js b/ext/js/app/frontend.js index bdb8cfc5..71b8d6ef 100644 --- a/ext/js/app/frontend.js +++ b/ext/js/app/frontend.js @@ -20,6 +20,7 @@ import {createApiMap, invokeApiMapHandler} from '../core/api-map.js'; import {EventListenerCollection} from '../core/event-listener-collection.js'; import {log} from '../core/log.js'; import {promiseAnimationFrame} from '../core/promise-animation-frame.js'; +import {setProfile} from '../data/profiles-util.js'; import {addFullscreenChangeEventListener, getFullscreenElement} from '../dom/document-util.js'; import {TextSourceElement} from '../dom/text-source-element.js'; import {TextSourceGenerator} from '../dom/text-source-generator.js'; @@ -122,6 +123,8 @@ export class Frontend { ['scanSelectedText', this._onActionScanSelectedText.bind(this)], ['scanTextAtSelection', this._onActionScanTextAtSelection.bind(this)], ['scanTextAtCaret', this._onActionScanTextAtCaret.bind(this)], + ['profilePrevious', async () => { await setProfile(-1, this._application); }], + ['profileNext', async () => { await setProfile(1, this._application); }], ]); /* eslint-enable @stylistic/no-multi-spaces */ } -- cgit v1.2.3