diff --git a/src/drivers/webextension/js/driver.js b/src/drivers/webextension/js/driver.js index 113aefa00..f3453aef5 100644 --- a/src/drivers/webextension/js/driver.js +++ b/src/drivers/webextension/js/driver.js @@ -118,13 +118,9 @@ var callback = tabs => { }) }; -try { - browser.tabs.query({}) - .then(callback) - .catch(error => wappalyzer.log(error, 'driver', 'error')); -} catch ( e ) { - browser.tabs.query({}, callback); -} +browser.tabs.query({}) + .then(callback) + .catch(error => wappalyzer.log(error, 'driver', 'error')); // Capture response headers browser.webRequest.onCompleted.addListener(request => { diff --git a/src/drivers/webextension/js/popup.js b/src/drivers/webextension/js/popup.js index 237dbae7e..377934f97 100644 --- a/src/drivers/webextension/js/popup.js +++ b/src/drivers/webextension/js/popup.js @@ -11,15 +11,9 @@ var func = tabs => { }); }; -try { - // Chrome, Firefox - browser.tabs.query({ active: true, currentWindow: true }) - .then(func) - .catch(console.error); -} catch ( e ) { - // Edge - browser.tabs.query({ active: true, currentWindow: true }, func); -} +browser.tabs.query({ active: true, currentWindow: true }) + .then(func) + .catch(console.error); function replaceDomWhenReady(dom) { if ( /complete|interactive|loaded/.test(document.readyState) ) {