Add Stack Analytix detection, remove cart functionality from display

main
Elbert Alias 4 years ago
parent bcf3967b91
commit bb09440df2

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 16 KiB

@ -499,14 +499,18 @@ const Driver = {
let icon = 'default.svg' let icon = 'default.svg'
const _technologies = technologies.filter(
({ slug }) => slug !== 'cart-functionality'
)
if (dynamicIcon) { if (dynamicIcon) {
const pinnedCategory = parseInt(await getOption('pinnedCategory'), 10) const pinnedCategory = parseInt(await getOption('pinnedCategory'), 10)
const pinned = technologies.find(({ categories }) => const pinned = _technologies.find(({ categories }) =>
categories.some(({ id }) => id === pinnedCategory) categories.some(({ id }) => id === pinnedCategory)
) )
;({ icon } = pinned || technologies[0] || { icon }) ;({ icon } = pinned || _technologies[0] || { icon })
} }
if (!url) { if (!url) {
@ -528,7 +532,9 @@ const Driver = {
{ {
tabId, tabId,
text: text:
badge && technologies.length ? technologies.length.toString() : '', badge && _technologies.length
? _technologies.length.toString()
: '',
}, },
() => {} () => {}
) )

@ -188,6 +188,10 @@ const Popup = {
* @param {Array} detections * @param {Array} detections
*/ */
async onGetDetections(detections = []) { async onGetDetections(detections = []) {
detections = detections
.filter(({ confidence }) => confidence >= 50)
.filter(({ slug }) => slug !== 'cart-functionality')
if (!detections || !detections.length) { if (!detections || !detections.length) {
document.querySelector('.empty').classList.remove('empty--hidden') document.querySelector('.empty').classList.remove('empty--hidden')
document.querySelector('.detections').classList.add('detections--hidden') document.querySelector('.detections').classList.add('detections--hidden')
@ -241,9 +245,8 @@ const Popup = {
}) })
) )
technologies technologies.forEach(
.filter(({ confidence }) => confidence >= 50) ({ name, slug, confidence, version, icon, website }) => {
.forEach(({ 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') const image = technologyNode.querySelector('.technology__icon')
@ -279,7 +282,8 @@ const Popup = {
categoryNode categoryNode
.querySelector('.technologies') .querySelector('.technologies')
.appendChild(technologyNode) .appendChild(technologyNode)
}) }
)
document.querySelector('.detections').appendChild(categoryNode) document.querySelector('.detections').appendChild(categoryNode)
}) })

@ -7127,6 +7127,20 @@
"saas": true, "saas": true,
"website": "https://ads.google.com" "website": "https://ads.google.com"
}, },
"Stack Analytix": {
"cats": [
10
],
"description": "Stack Analytix offers heatmaps, session recording, conversion analysis and user engagement tools.",
"icon": "Stack Analytix.svg",
"js": {
"stackAnalysis": ""
},
"saas": true,
"pricing": ["low", "recurring"],
"scripts": "api\\.stackanalytix\\.com",
"website": "https://www.stackanalytix.com"
},
"Google Analytics": { "Google Analytics": {
"cats": [ "cats": [
10 10
@ -13176,7 +13190,7 @@
10 10
], ],
"cookies": {}, "cookies": {},
"description": "Plausible is an open-source alternative to Google Analytics.", "description": "Plausible is an open-source alternative to Google Analytics.",
"icon": "Plausible.svg", "icon": "Plausible.svg",
"js": { "js": {
"plausible": "" "plausible": ""