diff --git a/src/commandline_frame.ts b/src/commandline_frame.ts index f4ffd7ab..ede63f97 100644 --- a/src/commandline_frame.ts +++ b/src/commandline_frame.ts @@ -162,13 +162,13 @@ const noblur = () => setTimeout(() => commandline_state.clInput.focus(), 0) /** @hidden **/ export function focus() { - logger.info("Called focus() after 2000ms") - Messaging.messageOwnTab("clInputFocused", "unused") + logger.debug("Called focus()") + Messaging.messageOwnTab("cl_input_focused", "unused") commandline_state.clInput.focus() commandline_state.clInput.removeEventListener("blur", noblur) commandline_state.clInput.addEventListener("blur", noblur) if (keysFromContentProcess.length !== 0) { - logger.info("Dispatching " + JSON.stringify(keysFromContentProcess)); + logger.debug("Dispatching " + JSON.stringify(keysFromContentProcess)); keysFromContentProcess.forEach(key => commandline_state.clInput.value += key) keysFromContentProcess = [] } @@ -176,7 +176,7 @@ export function focus() { let keysFromContentProcess: string[] = [] export function bufferUntilClInputFocused([key]) { - logger.info("Received keyboardEvent for buffering " + key) + logger.debug("Received keyboardEvent for buffering " + key) if (window.document.activeElement === commandline_state.clInput) { commandline_state.clInput.value += key } @@ -200,7 +200,6 @@ let prev_cmd_called_history = false // Save programmer time by generating an immediately resolved promise // eslint-disable-next-line @typescript-eslint/no-empty-function const QUEUE: Promise[] = [(async () => {})()] -logger.info("Setting event listeners of commandline_state.clInput") /** @hidden **/ commandline_state.clInput.addEventListener( diff --git a/src/content/commandline_content.ts b/src/content/commandline_content.ts index b6bf86b5..efac967e 100644 --- a/src/content/commandline_content.ts +++ b/src/content/commandline_content.ts @@ -63,7 +63,7 @@ export function show(hidehover = false) { * * Inspired by VVimpulation: https://github.com/amedama41/vvimpulation/commit/53065d015d1e9a892496619b51be83771f57b3d5 */ - logger.info("Called show()") + logger.debug("Called show()") if (hidehover) { const a = window.document.createElement("A") ;(a as any).href = "" diff --git a/src/content/controller_content.ts b/src/content/controller_content.ts index 9c1c48b0..20710c99 100644 --- a/src/content/controller_content.ts +++ b/src/content/controller_content.ts @@ -193,7 +193,7 @@ function* ParserController() { if (response.exstr) { exstr = response.exstr if (exstr.startsWith("fillcmdline ")) { - logger.info("Setting bufferUntilClInputFocused to true") + logger.debug("Setting bufferUntilClInputFocused to true") bufferUntilClInputFocused = true } break @@ -216,8 +216,8 @@ function* ParserController() { } } } -Messaging.addListener("clInputFocused", () => { - logger.info("Callback clInputFocused") +Messaging.addListener("cl_input_focused", () => { + logger.debug("Callback cl_input_focused") bufferUntilClInputFocused = false }) let bufferUntilClInputFocused: boolean = false @@ -226,12 +226,12 @@ generator.next() /** Feed keys to the ParserController */ export function acceptKey(keyevent: KeyboardEvent) { - logger.info("bufferUntilClInputFocused = " + bufferUntilClInputFocused) + logger.debug("bufferUntilClInputFocused = " + bufferUntilClInputFocused) if (bufferUntilClInputFocused) { let isCharacterKey = keyevent.key.length == 1 && !keyevent.metaKey && !keyevent.ctrlKey && !keyevent.altKey && !keyevent.metaKey; if (isCharacterKey) { - logger.info("Sending keyboardEvent for buffering ", keyevent) + logger.debug("Sending keyboardEvent for buffering ", keyevent) Messaging.messageOwnTab("commandline_frame", "bufferUntilClInputFocused", [keyevent.key]); } keyevent.preventDefault() diff --git a/src/excmds.ts b/src/excmds.ts index e11b3c9c..a71dd89f 100644 --- a/src/excmds.ts +++ b/src/excmds.ts @@ -3861,7 +3861,7 @@ export function sleep(time_ms: number) { /** @hidden */ //#content export function showcmdline(focus = true) { - logger.info("Called showcmdline") + logger.debug("Called showcmdline") const hidehover = true CommandLineContent.show(hidehover) let done = Promise.resolve() diff --git a/src/lib/messaging.ts b/src/lib/messaging.ts index fc7b398b..f8999e27 100644 --- a/src/lib/messaging.ts +++ b/src/lib/messaging.ts @@ -15,7 +15,7 @@ export type TabMessageType = | "lock" | "alive" | "tab_changes" - | "clInputFocused" + | "cl_input_focused" export type NonTabMessageType = | "owntab_background"