|
|
|
@ -120,14 +120,15 @@ const Popup = {
|
|
|
|
|
document.querySelector('.empty').remove()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Popup.categorise(detections).forEach(
|
|
|
|
|
({ id, name, slug: categorySlug, technologies }) => {
|
|
|
|
|
const categorised = Popup.categorise(detections)
|
|
|
|
|
|
|
|
|
|
categorised.forEach(({ id, name, slug: categorySlug, technologies }) => {
|
|
|
|
|
const categoryNode = Popup.templates.category.cloneNode(true)
|
|
|
|
|
|
|
|
|
|
const link = categoryNode.querySelector('.category__link')
|
|
|
|
|
|
|
|
|
|
link.href = `https://www.wappalyzer.com/technologies/${categorySlug}`
|
|
|
|
|
link.textContent = name
|
|
|
|
|
link.dataset.i18n = `categoryName${id}`
|
|
|
|
|
|
|
|
|
|
const pins = categoryNode.querySelectorAll('.category__pin')
|
|
|
|
|
|
|
|
|
@ -193,8 +194,13 @@ const Popup = {
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
document.querySelector('.detections').appendChild(categoryNode)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
if (categorised.length === 1) {
|
|
|
|
|
document
|
|
|
|
|
.querySelector('.detections')
|
|
|
|
|
.appendChild(Popup.templates.category.cloneNode(true))
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
Array.from(document.querySelectorAll('a')).forEach((a) =>
|
|
|
|
|
a.addEventListener('click', (event) => {
|
|
|
|
|