From 1d2324e760578a9f60501cc1c6bd38dc893b217d Mon Sep 17 00:00:00 2001 From: Elbert Alias <77259+AliasIO@users.noreply.github.com> Date: Wed, 11 Nov 2020 10:19:47 +1100 Subject: [PATCH] Prevent multiple DNS lookups --- src/drivers/npm/driver.js | 5 ++--- src/drivers/webextension/js/driver.js | 8 ++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/drivers/npm/driver.js b/src/drivers/npm/driver.js index fb60c9b7f..45dfe9cf5 100644 --- a/src/drivers/npm/driver.js +++ b/src/drivers/npm/driver.js @@ -639,7 +639,7 @@ class Site { } // DNS - if (!this.dns.length) { + if (!Object.keys(this.dns).length) { const records = {} const resolve = (func, hostname) => { return this.promiseTimeout( @@ -722,9 +722,8 @@ class Site { ) && link.protocol && link.protocol.match(/https?:/) && - link.rel !== 'nofollow' && link.hostname === url.hostname && - extensions.test(link.pathname) + extensions.test(link.pathname.slice(-5)) ) { results.push(new URL(link.href.split('#')[0])) } diff --git a/src/drivers/webextension/js/driver.js b/src/drivers/webextension/js/driver.js index 88ac208c9..9d788e2d1 100644 --- a/src/drivers/webextension/js/driver.js +++ b/src/drivers/webextension/js/driver.js @@ -79,10 +79,10 @@ const Driver = { 'https://www.wappalyzer.com/installed/?utm_source=installed&utm_medium=extension&utm_campaign=wappalyzer' ) } else if (version !== previous && upgradeMessage) { - // open( - // `https://www.wappalyzer.com/upgraded/?utm_source=upgraded&utm_medium=extension&utm_campaign=wappalyzer`, - // false - // ) + open( + `https://www.wappalyzer.com/upgraded/?utm_source=upgraded&utm_medium=extension&utm_campaign=wappalyzer`, + false + ) } await setOption('version', version)