|
|
@ -52,32 +52,33 @@ const Popup = {
|
|
|
|
document.querySelector('.terms').addEventListener('click', async () => {
|
|
|
|
document.querySelector('.terms').addEventListener('click', async () => {
|
|
|
|
await setOption('termsAccepted', true)
|
|
|
|
await setOption('termsAccepted', true)
|
|
|
|
|
|
|
|
|
|
|
|
document.querySelector('.terms').classList.remove('terms--hidden')
|
|
|
|
document.querySelector('.terms').classList.add('terms--hidden')
|
|
|
|
document
|
|
|
|
document.querySelector('.empty').classList.remove('empty--hidden')
|
|
|
|
.querySelector('.detections')
|
|
|
|
|
|
|
|
.classList.add('.detections--hidden')
|
|
|
|
|
|
|
|
document.querySelector('.empty').classList.add('empty--hidden')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chrome.runtime.sendMessage('getDetections', Popup.onGetDetections)
|
|
|
|
chrome.runtime.sendMessage('getDetections', Popup.onGetDetections)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Alert
|
|
|
|
// Alert
|
|
|
|
const [{ url }] = await promisify(chrome.tabs, 'query', {
|
|
|
|
const tabs = await promisify(chrome.tabs, 'query', {
|
|
|
|
active: true,
|
|
|
|
active: true,
|
|
|
|
currentWindow: true
|
|
|
|
currentWindow: true
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
if (url.startsWith('http')) {
|
|
|
|
if (tabs && tabs.length) {
|
|
|
|
document.querySelector('.alerts').classList.remove('alerts--hidden')
|
|
|
|
const [{ url }] = tabs
|
|
|
|
|
|
|
|
|
|
|
|
document.querySelector(
|
|
|
|
if (url.startsWith('http')) {
|
|
|
|
'.alerts__link'
|
|
|
|
document.querySelector('.alerts').classList.remove('alerts--hidden')
|
|
|
|
).href = `https://www.wappalyzer.com/alerts/manage?url=${encodeURIComponent(
|
|
|
|
|
|
|
|
`${url}`
|
|
|
|
document.querySelector(
|
|
|
|
)}`
|
|
|
|
'.alerts__link'
|
|
|
|
} else {
|
|
|
|
).href = `https://www.wappalyzer.com/alerts/manage?url=${encodeURIComponent(
|
|
|
|
document.querySelector('.alerts').classList.add('alerts--hidden')
|
|
|
|
`${url}`
|
|
|
|
|
|
|
|
)}`
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
document.querySelector('.alerts').classList.add('alerts--hidden')
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
document
|
|
|
|
document
|
|
|
@ -131,6 +132,7 @@ const Popup = {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
document.querySelector('.empty').classList.add('empty--hidden')
|
|
|
|
document.querySelector('.empty').classList.add('empty--hidden')
|
|
|
|
|
|
|
|
document.querySelector('.detections').classList.remove('empty--hidden')
|
|
|
|
|
|
|
|
|
|
|
|
const pinnedCategory = await getOption('pinnedCategory')
|
|
|
|
const pinnedCategory = await getOption('pinnedCategory')
|
|
|
|
|
|
|
|
|
|
|
|