Skip to content

Commit

Permalink
ignore error
Browse files Browse the repository at this point in the history
  • Loading branch information
omegaee committed Dec 16, 2024
1 parent ba1af91 commit 4587e32
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/message/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const msgSetConfig = (config: DeepPartial<LocalStorageConfig>) => {
return chrome.runtime.sendMessage<SetConfigRequest, void>({
type: RuntimeMsg.SetConfig,
config,
}).catch(() => { })
})
}

/**
Expand All @@ -16,7 +16,7 @@ export const msgSetConfig = (config: DeepPartial<LocalStorageConfig>) => {
export const msgGetNotice = (tabId: number, host: string) => {
return chrome.runtime.sendMessage<GetNoticeRequest, GetNoticeMsg>({
type: RuntimeMsg.GetNotice, tabId, host,
}).catch(() => { })
})
}

/**
Expand All @@ -26,7 +26,7 @@ export const msgSetHookRecords = (hookRecords: Partial<Record<HookFingerprintKey
return chrome.runtime.sendMessage<SetHookRecordsRequest, void>({
type: RuntimeMsg.SetHookRecords,
data: hookRecords,
}).catch(() => { })
})
}

/**
Expand All @@ -37,7 +37,7 @@ export const msgAddWhiteList = (host: string | string[]) => {
type: RuntimeMsg.UpdateWhitelist,
mode: 'add',
host,
}).catch(() => { })
})
}

/**
Expand All @@ -48,11 +48,11 @@ export const msgDelWhiteList = (host: string) => {
type: RuntimeMsg.UpdateWhitelist,
mode: 'del',
host,
}).catch(() => { })
})
}

export const msgGetNewVersion = () => {
return chrome.runtime.sendMessage<GetNewVersionRequest, GetNewVersionMsg>({
type: RuntimeMsg.GetNewVersion,
}).catch(() => { })
})
}
2 changes: 1 addition & 1 deletion src/message/tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export const tabChangeWhitelist = (tabId: number, mode: ChangeScriptWhitelistReq
return chrome.tabs.sendMessage<ChangeScriptWhitelistRequest, void>(tabId, {
type: RuntimeMsg.ChangeScriptWhitelist,
mode,
}).catch(() => { })
})
}

0 comments on commit 4587e32

Please sign in to comment.