From 3887aefee08a48d49c60ffa803318f5b8203045b Mon Sep 17 00:00:00 2001 From: Elbert Alias <77259+AliasIO@users.noreply.github.com> Date: Mon, 1 Nov 2021 07:44:11 +1100 Subject: [PATCH] Fix analyzeJs and analyzeDom functions --- src/drivers/webextension/css/styles.css | 11 ----------- src/drivers/webextension/html/popup.html | 2 +- src/drivers/webextension/js/driver.js | 8 ++++++-- src/drivers/webextension/js/popup.js | 13 ------------- 4 files changed, 7 insertions(+), 27 deletions(-) diff --git a/src/drivers/webextension/css/styles.css b/src/drivers/webextension/css/styles.css index 694ce7182..9e59a6628 100644 --- a/src/drivers/webextension/css/styles.css +++ b/src/drivers/webextension/css/styles.css @@ -227,17 +227,6 @@ small { display: none; } -.tab__dot { - color: #ff5252; - position: absolute; - margin-left: .1rem; - top: .6rem; -} - -.tab__dot--hidden { - display: none; -} - .credits { color: var(--color-text-lighten); display: block; diff --git a/src/drivers/webextension/html/popup.html b/src/drivers/webextension/html/popup.html index 929bb1a21..7a9848d91 100644 --- a/src/drivers/webextension/html/popup.html +++ b/src/drivers/webextension/html/popup.html @@ -47,7 +47,7 @@
 
-
 
+
 
  diff --git a/src/drivers/webextension/js/driver.js b/src/drivers/webextension/js/driver.js index ec2a7d1a8..1aea013d9 100644 --- a/src/drivers/webextension/js/driver.js +++ b/src/drivers/webextension/js/driver.js @@ -209,7 +209,9 @@ const Driver = { * @param {Array} js */ async analyzeJs(url, js, requires, categoryRequires) { - const technologies = getRequiredTechnologies(requires, categoryRequires) + const technologies = + getRequiredTechnologies(requires, categoryRequires) || + Wappalyzer.technologies return Driver.onDetect( url, @@ -236,7 +238,9 @@ const Driver = { * @param {Array} dom */ async analyzeDom(url, dom, requires, categoryRequires) { - const technologies = getRequiredTechnologies(requires, categoryRequires) + const technologies = + getRequiredTechnologies(requires, categoryRequires) || + Wappalyzer.technologies return Driver.onDetect( url, diff --git a/src/drivers/webextension/js/popup.js b/src/drivers/webextension/js/popup.js index 93fff9123..fae3bed91 100644 --- a/src/drivers/webextension/js/popup.js +++ b/src/drivers/webextension/js/popup.js @@ -68,7 +68,6 @@ const Popup = { empty: document.querySelector('.empty'), footer: document.querySelector('.footer'), tabPlus: document.querySelector('.tab--plus'), - tabPlusDot: document.querySelector('.tab__dot'), termsButtonAccept: document.querySelector('.terms__button--accept'), termsButtonDecline: document.querySelector('.terms__button--decline'), headerSwitches: document.querySelectorAll('.header__switch'), @@ -102,12 +101,6 @@ const Popup = { return templates }, {}) - const plusTabViewed = await getOption('plusTabViewed', false) - - if (plusTabViewed) { - el.tabPlusDot.classList.add('tab__dot--hidden') - } - // Disabled domains const dynamicIcon = await getOption('dynamicIcon', false) @@ -255,12 +248,6 @@ const Popup = { if (tab.classList.contains('tab--plus')) { await Popup.getPlus(url) - - if (!plusTabViewed) { - await setOption('plusTabViewed', true) - - el.tabPlusDot.classList.add('tab__dot--hidden') - } } }) })