Merge branch 'master' of github.com:AliasIO/Wappalyzer

main
Elbert Alias 7 years ago
commit 538e843b0d

@ -118,13 +118,9 @@ var callback = tabs => {
}) })
}; };
try { browser.tabs.query({})
browser.tabs.query({}) .then(callback)
.then(callback) .catch(error => wappalyzer.log(error, 'driver', 'error'));
.catch(error => wappalyzer.log(error, 'driver', 'error'));
} catch ( e ) {
browser.tabs.query({}, callback);
}
// Capture response headers // Capture response headers
browser.webRequest.onCompleted.addListener(request => { browser.webRequest.onCompleted.addListener(request => {
@ -248,10 +244,14 @@ wappalyzer.driver.displayApps = (detected, meta, context) => {
icon = 'converted/' + icon.replace(/\.svg$/, '.png'); icon = 'converted/' + icon.replace(/\.svg$/, '.png');
} }
browser.pageAction.setIcon({ try {
tabId: tab.id, browser.pageAction.setIcon({
path: '../images/icons/' + icon tabId: tab.id,
}); path: '../images/icons/' + icon
});
} catch(e) {
// Firefox for Android does not support setIcon see https://bugzilla.mozilla.org/show_bug.cgi?id=1331746
}
found = true; found = true;
} }

@ -11,15 +11,9 @@ var func = tabs => {
}); });
}; };
try { browser.tabs.query({ active: true, currentWindow: true })
// Chrome, Firefox .then(func)
browser.tabs.query({ active: true, currentWindow: true }) .catch(console.error);
.then(func)
.catch(console.error);
} catch ( e ) {
// Edge
browser.tabs.query({ active: true, currentWindow: true }, func);
}
function replaceDomWhenReady(dom) { function replaceDomWhenReady(dom) {
if ( /complete|interactive|loaded/.test(document.readyState) ) { if ( /complete|interactive|loaded/.test(document.readyState) ) {

Loading…
Cancel
Save