[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-wallet-webex] 01/02: don't stop injection early
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-wallet-webex] 01/02: don't stop injection early |
Date: |
Wed, 30 Aug 2017 17:09:00 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-webex.
commit 24e021fef360448caf11ab5a489b570102e66f6f
Author: Florian Dold <address@hidden>
AuthorDate: Wed Aug 30 15:35:34 2017 +0200
don't stop injection early
---
src/webex/wxBackend.ts | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/webex/wxBackend.ts b/src/webex/wxBackend.ts
index 2f249af4..db2ffbfb 100644
--- a/src/webex/wxBackend.ts
+++ b/src/webex/wxBackend.ts
@@ -599,22 +599,23 @@ export async function wxMain() {
};
chrome.tabs.query({}, (tabs) => {
+ console.log("got tabs", tabs);
for (const tab of tabs) {
if (!tab.url || !tab.id) {
- return;
+ continue;
}
const uri = new URI(tab.url);
if (uri.protocol() !== "http" && uri.protocol() !== "https") {
- return;
+ continue;
}
console.log("injecting into existing tab", tab.id, "with url",
uri.href(), "protocol", uri.protocol());
- injectScript(tab.id, { file: "/dist/contentScript-bundle.js" },
uri.href());
+ injectScript(tab.id, { file: "/dist/contentScript-bundle.js", runAt:
"document_start" }, uri.href());
const code = `
if (("taler" in window) ||
document.documentElement.getAttribute("data-taler-nojs")) {
document.dispatchEvent(new Event("taler-probe-result"));
}
`;
- injectScript(tab.id, { code, runAt: "document_idle" }, uri.href());
+ injectScript(tab.id, { code, runAt: "document_start" }, uri.href());
}
});
--
To stop receiving notification emails like this one, please contact
address@hidden