only inject in http(s)

This commit is contained in:
Florian Dold 2016-11-19 23:50:40 +01:00
parent 7b1511a243
commit 9846d02097

View File

@ -471,6 +471,10 @@ export function wxMain() {
if (!tab.url || !tab.id) { if (!tab.url || !tab.id) {
return; return;
} }
let uri = URI(tab.url);
if (!(uri.protocol() == "http" || uri.protocol() == "https")) {
return;
}
let code = ` let code = `
if (document.documentElement.getAttribute("data-taler-nojs")) { if (document.documentElement.getAttribute("data-taler-nojs")) {
document.dispatchEvent(new Event("taler-probe-result")); document.dispatchEvent(new Event("taler-probe-result"));