From bf9b580703005a963e200fc7ca5ec90174b97f04 Mon Sep 17 00:00:00 2001 From: Elbert Alias <77259+AliasIO@users.noreply.github.com> Date: Wed, 2 Jun 2021 14:59:17 +1000 Subject: [PATCH] Minor fixes --- src/drivers/webextension/js/driver.js | 6 ------ src/drivers/webextension/js/popup.js | 9 +++++++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/drivers/webextension/js/driver.js b/src/drivers/webextension/js/driver.js index 20c1a2de7..37f6b10e2 100644 --- a/src/drivers/webextension/js/driver.js +++ b/src/drivers/webextension/js/driver.js @@ -84,7 +84,6 @@ const Driver = { Driver.cache.tabs[id] = cache ? resolve(cache.detections) : [] - console.log('a') await Driver.setIcon(url, Driver.cache.tabs[id]) } }) @@ -523,7 +522,6 @@ const Driver = { return detection }) - console.log('b') await Driver.setIcon(url, resolved) if (url) { @@ -567,8 +565,6 @@ const Driver = { const showCached = await getOption('showCached', true) const badge = await getOption('badge', true) - console.log(showCached) - let icon = 'default.svg' const _technologies = technologies.filter( @@ -638,7 +634,6 @@ const Driver = { }) if (await Driver.isDisabledDomain(url)) { - console.log('c') await Driver.setIcon(url, []) return @@ -650,7 +645,6 @@ const Driver = { ({ cached }) => showCached || cached === false ) - console.log('d') await Driver.setIcon(url, resolved) return resolved diff --git a/src/drivers/webextension/js/popup.js b/src/drivers/webextension/js/popup.js index 70c0753b5..d56129673 100644 --- a/src/drivers/webextension/js/popup.js +++ b/src/drivers/webextension/js/popup.js @@ -212,7 +212,12 @@ const Popup = { ) // Footer - const item = footers[Math.round(Math.random() * (footers.length - 1))] + const item = + footers[ + Math.round(Math.random()) + ? 0 + : Math.round(Math.random() * (footers.length - 1)) + ] document.querySelector('.footer__heading-text').textContent = item.heading document.querySelector('.footer__content-body').textContent = item.body @@ -351,7 +356,7 @@ const Popup = { ) technologies.forEach( - ({ name, slug, confidence, version, icon, website, current }) => { + ({ name, slug, confidence, version, icon, website }) => { const technologyNode = Popup.templates.technology.cloneNode(true) const image = technologyNode.querySelector('.technology__icon img')