summaryrefslogtreecommitdiff
path: root/src/webex/wxBackend.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-07-09 17:06:10 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-07-09 17:06:10 +0530
commit2efe743950ade93ef6cb981a6ac4a56ef3e71ec7 (patch)
treebd75e936818c77546bc1c91c72bbf57116ff360e /src/webex/wxBackend.ts
parent798e7f556ef8abb474b145a87b77bab66762d227 (diff)
downloadwallet-core-2efe743950ade93ef6cb981a6ac4a56ef3e71ec7.tar.gz
wallet-core-2efe743950ade93ef6cb981a6ac4a56ef3e71ec7.tar.bz2
wallet-core-2efe743950ade93ef6cb981a6ac4a56ef3e71ec7.zip
dce
Diffstat (limited to 'src/webex/wxBackend.ts')
-rw-r--r--src/webex/wxBackend.ts25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/webex/wxBackend.ts b/src/webex/wxBackend.ts
index 54486c356..88d5545d9 100644
--- a/src/webex/wxBackend.ts
+++ b/src/webex/wxBackend.ts
@@ -453,31 +453,6 @@ async function reinitWallet(): Promise<void> {
walletInit.resolve();
}
-/**
- * Inject a script into a tab. Gracefully logs errors
- * and works around a bug where the tab's URL does not match the internal URL,
- * making the injection fail in a confusing way.
- */
-function injectScript(
- tabId: number,
- details: chrome.tabs.InjectDetails,
- actualUrl: string,
-): void {
- chrome.tabs.executeScript(tabId, details, () => {
- // Required to squelch chrome's "unchecked lastError" warning.
- // Sometimes chrome reports the URL of a tab as http/https but
- // injection fails. This can happen when a page is unloaded or
- // shows a "no internet" page etc.
- if (chrome.runtime.lastError) {
- console.warn(
- "injection failed on page",
- actualUrl,
- chrome.runtime.lastError.message,
- );
- }
- });
-}
-
try {
// This needs to be outside of main, as Firefox won't fire the event if
// the listener isn't created synchronously on loading the backend.