Minor fixes

main
Elbert Alias 4 years ago
parent 65c830a70d
commit bf9b580703

@ -84,7 +84,6 @@ const Driver = {
Driver.cache.tabs[id] = cache ? resolve(cache.detections) : [] Driver.cache.tabs[id] = cache ? resolve(cache.detections) : []
console.log('a')
await Driver.setIcon(url, Driver.cache.tabs[id]) await Driver.setIcon(url, Driver.cache.tabs[id])
} }
}) })
@ -523,7 +522,6 @@ const Driver = {
return detection return detection
}) })
console.log('b')
await Driver.setIcon(url, resolved) await Driver.setIcon(url, resolved)
if (url) { if (url) {
@ -567,8 +565,6 @@ const Driver = {
const showCached = await getOption('showCached', true) const showCached = await getOption('showCached', true)
const badge = await getOption('badge', true) const badge = await getOption('badge', true)
console.log(showCached)
let icon = 'default.svg' let icon = 'default.svg'
const _technologies = technologies.filter( const _technologies = technologies.filter(
@ -638,7 +634,6 @@ const Driver = {
}) })
if (await Driver.isDisabledDomain(url)) { if (await Driver.isDisabledDomain(url)) {
console.log('c')
await Driver.setIcon(url, []) await Driver.setIcon(url, [])
return return
@ -650,7 +645,6 @@ const Driver = {
({ cached }) => showCached || cached === false ({ cached }) => showCached || cached === false
) )
console.log('d')
await Driver.setIcon(url, resolved) await Driver.setIcon(url, resolved)
return resolved return resolved

@ -212,7 +212,12 @@ const Popup = {
) )
// Footer // 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__heading-text').textContent = item.heading
document.querySelector('.footer__content-body').textContent = item.body document.querySelector('.footer__content-body').textContent = item.body
@ -351,7 +356,7 @@ const Popup = {
) )
technologies.forEach( technologies.forEach(
({ name, slug, confidence, version, icon, website, current }) => { ({ name, slug, confidence, version, icon, website }) => {
const technologyNode = Popup.templates.technology.cloneNode(true) const technologyNode = Popup.templates.technology.cloneNode(true)
const image = technologyNode.querySelector('.technology__icon img') const image = technologyNode.querySelector('.technology__icon img')