mirror of
https://github.com/vale981/tridactyl
synced 2025-03-06 01:51:40 -05:00
Add simple messenger to check it Tridactyl is running in a tab
This commit is contained in:
parent
47a3180ff1
commit
110d55119f
2 changed files with 5 additions and 1 deletions
|
@ -48,6 +48,9 @@ messaging.addListener(
|
|||
messaging.attributeCaller(controller),
|
||||
)
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/require-await
|
||||
messaging.addListener("alive", async () => true)
|
||||
|
||||
// Hook the keyboard up to the controller
|
||||
import * as ContentController from "@src/content/controller_content"
|
||||
import { getAllDocumentFrames } from "@src/lib/dom"
|
||||
|
|
|
@ -13,6 +13,7 @@ export type TabMessageType =
|
|||
| "commandline_frame"
|
||||
| "state"
|
||||
| "lock"
|
||||
| "alive"
|
||||
|
||||
export type NonTabMessageType =
|
||||
| "owntab_background"
|
||||
|
@ -140,7 +141,7 @@ export async function messageActiveTab(
|
|||
export async function messageTab(
|
||||
tabId,
|
||||
type: TabMessageType,
|
||||
command,
|
||||
command?,
|
||||
args?,
|
||||
): Promise<any> {
|
||||
const message: Message = {
|
||||
|
|
Loading…
Add table
Reference in a new issue