Add option to disable showing of cached detections

main
Elbert Alias 4 years ago
parent 8f06b60edd
commit 751bbb80d2

@ -10,6 +10,7 @@
"optionTracking": { "message": "Enviar les tecnologies identificades de forma anònima a wappalyzer.com" }, "optionTracking": { "message": "Enviar les tecnologies identificades de forma anònima a wappalyzer.com" },
"optionThemeMode": { "message": "Habilitar la compatibilitat de l'aspecte fosc" }, "optionThemeMode": { "message": "Habilitar la compatibilitat de l'aspecte fosc" },
"optionBadge": { "message": "Mostrar el nombre de tecnologies identificades en la icona" }, "optionBadge": { "message": "Mostrar el nombre de tecnologies identificades en la icona" },
"optionShowCached": { "message": "Include cached detections in results" },
"disableOnDomain": { "message": "Desactivar en aquest web" }, "disableOnDomain": { "message": "Desactivar en aquest web" },
"clearCache": { "message": "Esborrar la memòria cau de les deteccions" }, "clearCache": { "message": "Esborrar la memòria cau de les deteccions" },
"nothingToDo": { "message": "Res a fer aquí." }, "nothingToDo": { "message": "Res a fer aquí." },

@ -10,6 +10,7 @@
"optionTracking": { "message": "Anonyme Statistiken an wappalyzer.com übermitteln" }, "optionTracking": { "message": "Anonyme Statistiken an wappalyzer.com übermitteln" },
"optionThemeMode": { "message": "Dunkel-Modus aktivieren" }, "optionThemeMode": { "message": "Dunkel-Modus aktivieren" },
"optionBadge": { "message": "Anzahl der identifizierten Optionen am Icon anzeigen" }, "optionBadge": { "message": "Anzahl der identifizierten Optionen am Icon anzeigen" },
"optionShowCached": { "message": "Include cached detections in results" },
"disableOnDomain": { "message": "Auf dieser Website deaktivieren" }, "disableOnDomain": { "message": "Auf dieser Website deaktivieren" },
"clearCache": { "message": "Cache leeren" }, "clearCache": { "message": "Cache leeren" },
"nothingToDo": { "message": "Nichts zu tun." }, "nothingToDo": { "message": "Nichts zu tun." },

@ -10,6 +10,7 @@
"optionTracking": { "message": "Ανώνυμη αποστολή αναφορών για εντοπισμένες εφαρμογές στο wappalyzer.com για έρευνα" }, "optionTracking": { "message": "Ανώνυμη αποστολή αναφορών για εντοπισμένες εφαρμογές στο wappalyzer.com για έρευνα" },
"optionThemeMode": { "message": "Ενεργοποίηση συμβατότητας σκοτεινό τρόπο." }, "optionThemeMode": { "message": "Ενεργοποίηση συμβατότητας σκοτεινό τρόπο." },
"optionBadge": { "message": "Show the number of identified technologies on the icon" }, "optionBadge": { "message": "Show the number of identified technologies on the icon" },
"optionShowCached": { "message": "Include cached detections in results" },
"disableOnDomain": { "message": "Disable on this website" }, "disableOnDomain": { "message": "Disable on this website" },
"clearCache": { "message": "Clear cached detections" }, "clearCache": { "message": "Clear cached detections" },
"nothingToDo": { "message": "Καμία ενέργεια." }, "nothingToDo": { "message": "Καμία ενέργεια." },

@ -10,6 +10,7 @@
"optionTracking": { "message": "Anonymously send identified technologies to wappalyzer.com" }, "optionTracking": { "message": "Anonymously send identified technologies to wappalyzer.com" },
"optionThemeMode": { "message": "Enable dark mode compatibility" }, "optionThemeMode": { "message": "Enable dark mode compatibility" },
"optionBadge": { "message": "Show the number of identified technologies on the icon" }, "optionBadge": { "message": "Show the number of identified technologies on the icon" },
"optionShowCached": { "message": "Include cached detections in results" },
"disableOnDomain": { "message": "Disable on this website" }, "disableOnDomain": { "message": "Disable on this website" },
"clearCache": { "message": "Clear cached detections" }, "clearCache": { "message": "Clear cached detections" },
"nothingToDo": { "message": "Nothing to do here." }, "nothingToDo": { "message": "Nothing to do here." },

@ -10,6 +10,7 @@
"optionTracking": { "message": "Enviar informes anónimos sobre las aplicaciones detectadas a wappalyzer.com para análisis" }, "optionTracking": { "message": "Enviar informes anónimos sobre las aplicaciones detectadas a wappalyzer.com para análisis" },
"optionThemeMode": { "message": "Habilitar la compatibilidad del modo oscuro." }, "optionThemeMode": { "message": "Habilitar la compatibilidad del modo oscuro." },
"optionBadge": { "message": "Show the number of identified technologies on the icon" }, "optionBadge": { "message": "Show the number of identified technologies on the icon" },
"optionShowCached": { "message": "Include cached detections in results" },
"disableOnDomain": { "message": "Disable on this website" }, "disableOnDomain": { "message": "Disable on this website" },
"clearCache": { "message": "Clear cached detections" }, "clearCache": { "message": "Clear cached detections" },
"nothingToDo": { "message": "Nada que hacer aquí." }, "nothingToDo": { "message": "Nada que hacer aquí." },

@ -11,6 +11,7 @@
"optionThemeMode": { "message": "فعال کردن حالت سازگاری تاریک." }, "optionThemeMode": { "message": "فعال کردن حالت سازگاری تاریک." },
"nothingToDo": { "message": "هیچ چیز برای انجام اینجا نیست." }, "nothingToDo": { "message": "هیچ چیز برای انجام اینجا نیست." },
"optionBadge": { "message": "نمایش تعداد فناوری های شناسایی شده روی آیکون" }, "optionBadge": { "message": "نمایش تعداد فناوری های شناسایی شده روی آیکون" },
"optionShowCached": { "message": "Include cached detections in results" },
"disableOnDomain": { "message": "غیرفعال کردن در این وبسایت" }, "disableOnDomain": { "message": "غیرفعال کردن در این وبسایت" },
"clearCache": { "message": "پاکسازی شناسایی های کش شده" }, "clearCache": { "message": "پاکسازی شناسایی های کش شده" },
"noAppsDetected": { "message": "هیچ فن‌آوری شناسایی نشده است." }, "noAppsDetected": { "message": "هیچ فن‌آوری شناسایی نشده است." },

@ -10,6 +10,7 @@
"optionsSave": { "message": "Sauvegarder les options" }, "optionsSave": { "message": "Sauvegarder les options" },
"optionsSaved": { "message": "Sauvegardé" }, "optionsSaved": { "message": "Sauvegardé" },
"optionBadge": { "message": "Montrer le nombre de technologies identifiées sur l'icône" }, "optionBadge": { "message": "Montrer le nombre de technologies identifiées sur l'icône" },
"optionShowCached": { "message": "Include cached detections in results" },
"disableOnDomain": { "message": "Désactiver sur ce site web" }, "disableOnDomain": { "message": "Désactiver sur ce site web" },
"clearCache": { "message": "Effacer les détections mises en cache" }, "clearCache": { "message": "Effacer les détections mises en cache" },
"twitter": { "message": "Suivre Wappalyzer sur Twitter" }, "twitter": { "message": "Suivre Wappalyzer sur Twitter" },

@ -10,6 +10,7 @@
"optionTracking": { "message": "Envía anonimamente aplicativos identificados a wappalyzer.com" }, "optionTracking": { "message": "Envía anonimamente aplicativos identificados a wappalyzer.com" },
"optionThemeMode": { "message": "Permitir a compatibilidade modo escuro." }, "optionThemeMode": { "message": "Permitir a compatibilidade modo escuro." },
"optionBadge": { "message": "Show the number of identified technologies on the icon" }, "optionBadge": { "message": "Show the number of identified technologies on the icon" },
"optionShowCached": { "message": "Include cached detections in results" },
"disableOnDomain": { "message": "Disable on this website" }, "disableOnDomain": { "message": "Disable on this website" },
"clearCache": { "message": "Clear cached detections" }, "clearCache": { "message": "Clear cached detections" },
"nothingToDo": { "message": "Nada que facer por aquí." }, "nothingToDo": { "message": "Nada que facer por aquí." },

@ -10,6 +10,7 @@
"optionTracking": { "message": "Ανώνυμη αποστολή αναφορών για εντοπισμένες εφαρμογές στο wappalyzer.com για έρευνα" }, "optionTracking": { "message": "Ανώνυμη αποστολή αναφορών για εντοπισμένες εφαρμογές στο wappalyzer.com για έρευνα" },
"optionThemeMode": { "message": "Ενεργοποίηση συμβατότητας σκοτεινό τρόπο." }, "optionThemeMode": { "message": "Ενεργοποίηση συμβατότητας σκοτεινό τρόπο." },
"optionBadge": { "message": "Show the number of identified technologies on the icon" }, "optionBadge": { "message": "Show the number of identified technologies on the icon" },
"optionShowCached": { "message": "Include cached detections in results" },
"disableOnDomain": { "message": "Disable on this website" }, "disableOnDomain": { "message": "Disable on this website" },
"clearCache": { "message": "Clear cached detections" }, "clearCache": { "message": "Clear cached detections" },
"nothingToDo": { "message": "Καμία ενέργεια." }, "nothingToDo": { "message": "Καμία ενέργεια." },

@ -10,6 +10,7 @@
"optionTracking": { "message": "Secara anonim kirimkan laporan tentang aplikasi yang terdeteksi ke wappalyzer.com untuk penelitian" }, "optionTracking": { "message": "Secara anonim kirimkan laporan tentang aplikasi yang terdeteksi ke wappalyzer.com untuk penelitian" },
"optionThemeMode": { "message": "Aktifkan kompatibilitas modus gelap." }, "optionThemeMode": { "message": "Aktifkan kompatibilitas modus gelap." },
"optionBadge": { "message": "Show the number of identified technologies on the icon" }, "optionBadge": { "message": "Show the number of identified technologies on the icon" },
"optionShowCached": { "message": "Include cached detections in results" },
"disableOnDomain": { "message": "Disable on this website" }, "disableOnDomain": { "message": "Disable on this website" },
"clearCache": { "message": "Clear cached detections" }, "clearCache": { "message": "Clear cached detections" },
"nothingToDo": { "message": "Tak ada yang dilakukan disini." }, "nothingToDo": { "message": "Tak ada yang dilakukan disini." },

@ -10,6 +10,7 @@
"optionTracking": { "message": "Inviare anonimamente un report sulle applicazioni rilevate a wappalyzer.com per l'analisi" }, "optionTracking": { "message": "Inviare anonimamente un report sulle applicazioni rilevate a wappalyzer.com per l'analisi" },
"optionThemeMode": { "message": "Abilita compatibilità con la modalità scura." }, "optionThemeMode": { "message": "Abilita compatibilità con la modalità scura." },
"optionBadge": { "message": "Show the number of identified technologies on the icon" }, "optionBadge": { "message": "Show the number of identified technologies on the icon" },
"optionShowCached": { "message": "Include cached detections in results" },
"disableOnDomain": { "message": "Disable on this website" }, "disableOnDomain": { "message": "Disable on this website" },
"clearCache": { "message": "Clear cached detections" }, "clearCache": { "message": "Clear cached detections" },
"nothingToDo": { "message": "Niente da fare qui." }, "nothingToDo": { "message": "Niente da fare qui." },

@ -10,6 +10,7 @@
"optionTracking": { "message": "特定した技術を匿名でwappalyzer.comに送信する" }, "optionTracking": { "message": "特定した技術を匿名でwappalyzer.comに送信する" },
"optionThemeMode": { "message": "Enable dark mode compatibility." }, "optionThemeMode": { "message": "Enable dark mode compatibility." },
"optionBadge": { "message": "Show the number of identified technologies on the icon" }, "optionBadge": { "message": "Show the number of identified technologies on the icon" },
"optionShowCached": { "message": "Include cached detections in results" },
"disableOnDomain": { "message": "Disable on this website" }, "disableOnDomain": { "message": "Disable on this website" },
"clearCache": { "message": "Clear cached detections" }, "clearCache": { "message": "Clear cached detections" },
"nothingToDo": { "message": "ここでは特定出来ません。" }, "nothingToDo": { "message": "ここでは特定出来ません。" },

@ -10,6 +10,7 @@
"optionTracking": { "message": "익명으로 wappalyzer.com에 식별된 기술 정보 전송" }, "optionTracking": { "message": "익명으로 wappalyzer.com에 식별된 기술 정보 전송" },
"optionThemeMode": { "message": "다크 모드 호환 활성화" }, "optionThemeMode": { "message": "다크 모드 호환 활성화" },
"optionBadge": { "message": "아이콘에 식별된 기술 갯수 표시" }, "optionBadge": { "message": "아이콘에 식별된 기술 갯수 표시" },
"optionShowCached": { "message": "Include cached detections in results" },
"disableOnDomain": { "message": "이 웹 사이트에서 끄기" }, "disableOnDomain": { "message": "이 웹 사이트에서 끄기" },
"clearCache": { "message": "캐시된 식별 정보 지우기" }, "clearCache": { "message": "캐시된 식별 정보 지우기" },
"nothingToDo": { "message": "여기에는 할 일이 없네요." }, "nothingToDo": { "message": "여기에는 할 일이 없네요." },

@ -10,6 +10,7 @@
"optionTracking": { "message": "Przesyłaj anonimowe statystyki aplikacji wykrytych przez Wappalyzer do twórców" }, "optionTracking": { "message": "Przesyłaj anonimowe statystyki aplikacji wykrytych przez Wappalyzer do twórców" },
"optionThemeMode": { "message": "Włącz kompatybilność z ciemnym motywem." }, "optionThemeMode": { "message": "Włącz kompatybilność z ciemnym motywem." },
"optionBadge": { "message": "Show the number of identified technologies on the icon" }, "optionBadge": { "message": "Show the number of identified technologies on the icon" },
"optionShowCached": { "message": "Include cached detections in results" },
"disableOnDomain": { "message": "Disable on this website" }, "disableOnDomain": { "message": "Disable on this website" },
"clearCache": { "message": "Clear cached detections" }, "clearCache": { "message": "Clear cached detections" },
"nothingToDo": { "message": "Nic tu nie ma." }, "nothingToDo": { "message": "Nic tu nie ma." },

@ -10,6 +10,7 @@
"optionsSave": { "message": "Opções de Guardar" }, "optionsSave": { "message": "Opções de Guardar" },
"optionsSaved": { "message": "Guardado" }, "optionsSaved": { "message": "Guardado" },
"optionBadge": { "message": "Show the number of identified technologies on the icon" }, "optionBadge": { "message": "Show the number of identified technologies on the icon" },
"optionShowCached": { "message": "Include cached detections in results" },
"disableOnDomain": { "message": "Disable on this website" }, "disableOnDomain": { "message": "Disable on this website" },
"clearCache": { "message": "Clear cached detections" }, "clearCache": { "message": "Clear cached detections" },
"twitter": { "message": "Seguir Wappalyzer no Twitter" }, "twitter": { "message": "Seguir Wappalyzer no Twitter" },

@ -10,6 +10,7 @@
"optionTracking": { "message": "Enviar relatórios anônimos para wappalyzer.com sobre tecnologias identificadas" }, "optionTracking": { "message": "Enviar relatórios anônimos para wappalyzer.com sobre tecnologias identificadas" },
"optionThemeMode": { "message": "Permitir a compatibilidade modo escuro." }, "optionThemeMode": { "message": "Permitir a compatibilidade modo escuro." },
"optionBadge": { "message": "Show the number of identified technologies on the icon" }, "optionBadge": { "message": "Show the number of identified technologies on the icon" },
"optionShowCached": { "message": "Include cached detections in results" },
"disableOnDomain": { "message": "Disable on this website" }, "disableOnDomain": { "message": "Disable on this website" },
"clearCache": { "message": "Clear cached detections" }, "clearCache": { "message": "Clear cached detections" },
"nothingToDo": { "message": "Nada a fazer aqui." }, "nothingToDo": { "message": "Nada a fazer aqui." },

@ -10,6 +10,7 @@
"optionTracking": { "message": "Trimite rapoarte anonime despre aplicațiile detectate către wappalyzer.com pentru cercetare" }, "optionTracking": { "message": "Trimite rapoarte anonime despre aplicațiile detectate către wappalyzer.com pentru cercetare" },
"optionThemeMode": { "message": "Activează modul de compatibilitate întuneric." }, "optionThemeMode": { "message": "Activează modul de compatibilitate întuneric." },
"optionBadge": { "message": "Show the number of identified technologies on the icon" }, "optionBadge": { "message": "Show the number of identified technologies on the icon" },
"optionShowCached": { "message": "Include cached detections in results" },
"disableOnDomain": { "message": "Disable on this website" }, "disableOnDomain": { "message": "Disable on this website" },
"clearCache": { "message": "Clear cached detections" }, "clearCache": { "message": "Clear cached detections" },
"nothingToDo": { "message": "Nimic de făcut pe pagina curentă." }, "nothingToDo": { "message": "Nimic de făcut pe pagina curentă." },

@ -10,6 +10,7 @@
"optionTracking": { "message": "Анонимно отправлять статистику распознанных данных на wappalyzer.com" }, "optionTracking": { "message": "Анонимно отправлять статистику распознанных данных на wappalyzer.com" },
"optionThemeMode": { "message": "Темная тема" }, "optionThemeMode": { "message": "Темная тема" },
"optionBadge": { "message": "Show the number of identified technologies on the icon" }, "optionBadge": { "message": "Show the number of identified technologies on the icon" },
"optionShowCached": { "message": "Include cached detections in results" },
"disableOnDomain": { "message": "Disable on this website" }, "disableOnDomain": { "message": "Disable on this website" },
"clearCache": { "message": "Clear cached detections" }, "clearCache": { "message": "Clear cached detections" },
"nothingToDo": { "message": "Здесь нечего делать" }, "nothingToDo": { "message": "Здесь нечего делать" },

@ -10,6 +10,7 @@
"optionTracking": { "message": "Anonymne posielať správy o zistených aplikáciách na wappalyzer.com pre výskum" }, "optionTracking": { "message": "Anonymne posielať správy o zistených aplikáciách na wappalyzer.com pre výskum" },
"optionThemeMode": { "message": "Povoliť kompatibilitu tmavú režim." }, "optionThemeMode": { "message": "Povoliť kompatibilitu tmavú režim." },
"optionBadge": { "message": "Show the number of identified technologies on the icon" }, "optionBadge": { "message": "Show the number of identified technologies on the icon" },
"optionShowCached": { "message": "Include cached detections in results" },
"disableOnDomain": { "message": "Disable on this website" }, "disableOnDomain": { "message": "Disable on this website" },
"clearCache": { "message": "Clear cached detections" }, "clearCache": { "message": "Clear cached detections" },
"nothingToDo": { "message": "Nie je tu čo robiť." }, "nothingToDo": { "message": "Nie je tu čo robiť." },

@ -10,6 +10,7 @@
"optionTracking": { "message": "Anonim olarak tespit edilen uygulamalar hakkında wappalyzer.com'a araştırma raporları gönderin" }, "optionTracking": { "message": "Anonim olarak tespit edilen uygulamalar hakkında wappalyzer.com'a araştırma raporları gönderin" },
"optionThemeMode": { "message": "Karanlık modu uyumluluğu etkinleştirin." }, "optionThemeMode": { "message": "Karanlık modu uyumluluğu etkinleştirin." },
"optionBadge": { "message": "Show the number of identified technologies on the icon" }, "optionBadge": { "message": "Show the number of identified technologies on the icon" },
"optionShowCached": { "message": "Include cached detections in results" },
"disableOnDomain": { "message": "Disable on this website" }, "disableOnDomain": { "message": "Disable on this website" },
"clearCache": { "message": "Clear cached detections" }, "clearCache": { "message": "Clear cached detections" },
"nothingToDo": { "message": "Burada yapacak birşey yok." }, "nothingToDo": { "message": "Burada yapacak birşey yok." },

@ -10,6 +10,7 @@
"optionTracking": { "message": "Анонімно надсилати статистику розпізнавань на сервер для досліджень" }, "optionTracking": { "message": "Анонімно надсилати статистику розпізнавань на сервер для досліджень" },
"optionThemeMode": { "message": "Включити сумісність темного режиму." }, "optionThemeMode": { "message": "Включити сумісність темного режиму." },
"optionBadge": { "message": "Show the number of identified technologies on the icon" }, "optionBadge": { "message": "Show the number of identified technologies on the icon" },
"optionShowCached": { "message": "Include cached detections in results" },
"disableOnDomain": { "message": "Disable on this website" }, "disableOnDomain": { "message": "Disable on this website" },
"clearCache": { "message": "Clear cached detections" }, "clearCache": { "message": "Clear cached detections" },
"nothingToDo": { "message": "Тут нічого робити." }, "nothingToDo": { "message": "Тут нічого робити." },

@ -10,6 +10,7 @@
"optionTracking": { "message": "Wappalyzer takomillashtirish uchun hisobotlarni maxfiy ravishda serverga jo'natish" }, "optionTracking": { "message": "Wappalyzer takomillashtirish uchun hisobotlarni maxfiy ravishda serverga jo'natish" },
"optionThemeMode": { "message": "qorong'i rejimi mosligini yoqish." }, "optionThemeMode": { "message": "qorong'i rejimi mosligini yoqish." },
"optionBadge": { "message": "Show the number of identified technologies on the icon" }, "optionBadge": { "message": "Show the number of identified technologies on the icon" },
"optionShowCached": { "message": "Include cached detections in results" },
"disableOnDomain": { "message": "Disable on this website" }, "disableOnDomain": { "message": "Disable on this website" },
"clearCache": { "message": "Clear cached detections" }, "clearCache": { "message": "Clear cached detections" },
"nothingToDo": { "message": "Bu yerda tekshirib bolmaydi." }, "nothingToDo": { "message": "Bu yerda tekshirib bolmaydi." },

@ -10,6 +10,7 @@
"optionTracking": { "message": "匿名发送检测到的技术至 wappalyzer.com" }, "optionTracking": { "message": "匿名发送检测到的技术至 wappalyzer.com" },
"optionThemeMode": { "message": "启用深色模式兼容" }, "optionThemeMode": { "message": "启用深色模式兼容" },
"optionBadge": { "message": "在图标上显示检测到技术的个数" }, "optionBadge": { "message": "在图标上显示检测到技术的个数" },
"optionShowCached": { "message": "Include cached detections in results" },
"disableOnDomain": { "message": "在该网站禁用" }, "disableOnDomain": { "message": "在该网站禁用" },
"clearCache": { "message": "清除检测缓存" }, "clearCache": { "message": "清除检测缓存" },
"nothingToDo": { "message": "这里无事可做。" }, "nothingToDo": { "message": "这里无事可做。" },

@ -10,6 +10,7 @@
"optionTracking": { "message": "匿名傳送已識別的技術至 wappalyzer.com" }, "optionTracking": { "message": "匿名傳送已識別的技術至 wappalyzer.com" },
"optionThemeMode": { "message": "啟用暗模式的兼容性。" }, "optionThemeMode": { "message": "啟用暗模式的兼容性。" },
"optionBadge": { "message": "Show the number of identified technologies on the icon" }, "optionBadge": { "message": "Show the number of identified technologies on the icon" },
"optionShowCached": { "message": "Include cached detections in results" },
"disableOnDomain": { "message": "Disable on this website" }, "disableOnDomain": { "message": "Disable on this website" },
"clearCache": { "message": "Clear cached detections" }, "clearCache": { "message": "Clear cached detections" },
"nothingToDo": { "message": "這裡什麼也沒有。" }, "nothingToDo": { "message": "這裡什麼也沒有。" },

@ -31,6 +31,12 @@
<span data-i18n="optionBadge">&nbsp;</span> <span data-i18n="optionBadge">&nbsp;</span>
</label> </label>
<label class="options__label">
<input class="options__checkbox" type="checkbox">
<span data-i18n="optionShowCached">Show cached results</span>
</label>
<label class="options__label"> <label class="options__label">
<input class="options__checkbox" type="checkbox"> <input class="options__checkbox" type="checkbox">

@ -84,6 +84,7 @@ 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])
} }
}) })
@ -430,30 +431,41 @@ const Driver = {
return return
} }
const { protocol, hostname } = new URL(url) const { hostname } = new URL(url)
// Cache detections // Cache detections
const cache = (Driver.cache.hostnames[hostname] = { const cache = (Driver.cache.hostnames[hostname] = Driver.cache.hostnames[
...(Driver.cache.hostnames[hostname] || { hostname
url: `${protocol}//${hostname}`, ] || {
detections: [], detections: [],
hits: incrementHits ? 0 : 1, hits: incrementHits ? 0 : 1,
}),
dateTime: Date.now(),
}) })
cache.dateTime = Date.now()
// Remove duplicates // Remove duplicates
cache.detections = cache.detections cache.detections = cache.detections
.concat(detections) .concat(detections)
.filter(({ technology }) => technology) .filter(({ technology }) => technology)
.filter( .filter(
({ technology: { name }, pattern: { regex } }, index) => ({ technology: { name }, pattern: { regex } }, index, detections) =>
cache.detections.findIndex( detections.findIndex(
({ technology: { name: _name }, pattern: { regex: _regex } }) => ({ technology: { name: _name }, pattern: { regex: _regex } }) =>
name === _name && name === _name &&
(!regex || regex.toString() === _regex.toString()) (!regex || regex.toString() === _regex.toString())
) === index ) === index
) )
.map((detection) => {
if (
detections.find(
({ technology: { slug } }) => slug === detection.technology.slug
)
) {
detection.lastUrl = url
}
return detection
})
cache.hits += incrementHits ? 1 : 0 cache.hits += incrementHits ? 1 : 0
cache.language = cache.language || language cache.language = cache.language || language
@ -475,17 +487,18 @@ const Driver = {
await setOption( await setOption(
'hostnames', 'hostnames',
Object.keys(Driver.cache.hostnames).reduce( Object.keys(Driver.cache.hostnames).reduce(
(cache, hostname) => ({ (hostnames, hostname) => ({
...cache, ...hostnames,
[hostname]: { [hostname]: {
...Driver.cache.hostnames[hostname], ...cache,
detections: Driver.cache.hostnames[hostname].detections detections: cache.detections
.filter(({ technology }) => technology) .filter(({ technology }) => technology)
.map( .map(
({ ({
technology: { name: technology }, technology: { name: technology },
pattern: { regex, confidence }, pattern: { regex, confidence },
version, version,
lastUrl,
}) => ({ }) => ({
technology, technology,
pattern: { pattern: {
@ -493,6 +506,7 @@ const Driver = {
confidence, confidence,
}, },
version, version,
lastUrl,
}) })
), ),
}, },
@ -501,8 +515,15 @@ const Driver = {
) )
) )
const resolved = resolve(Driver.cache.hostnames[hostname].detections) const resolved = resolve(cache.detections).map((detection) => {
detection.cached = detection.lastUrl !== url
delete detection.lastUrl
return detection
})
console.log('b')
await Driver.setIcon(url, resolved) await Driver.setIcon(url, resolved)
if (url) { if (url) {
@ -543,12 +564,16 @@ const Driver = {
} }
const dynamicIcon = await getOption('dynamicIcon', false) const dynamicIcon = await getOption('dynamicIcon', false)
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(
({ slug }) => slug !== 'cart-functionality' ({ slug, cached }) =>
slug !== 'cart-functionality' && (showCached || cached === false)
) )
if (dynamicIcon) { if (dynamicIcon) {
@ -613,13 +638,19 @@ 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
} }
const resolved = Driver.cache.tabs[id] const showCached = await getOption('showCached', true)
const resolved = (Driver.cache.tabs[id] || []).filter(
({ cached }) => showCached || cached === false
)
console.log('d')
await Driver.setIcon(url, resolved) await Driver.setIcon(url, resolved)
return resolved return resolved

@ -17,6 +17,7 @@ const Options = {
['dynamicIcon', false], ['dynamicIcon', false],
['badge', true], ['badge', true],
['tracking', true], ['tracking', true],
['showCached', true],
].map(async ([option, defaultValue]) => { ].map(async ([option, defaultValue]) => {
const el = document const el = document
.querySelector( .querySelector(

@ -351,7 +351,7 @@ const Popup = {
) )
technologies.forEach( technologies.forEach(
({ name, slug, confidence, version, icon, website }) => { ({ name, slug, confidence, version, icon, website, current }) => {
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')

@ -29,7 +29,7 @@ const Wappalyzer = {
* @param {Array} detections * @param {Array} detections
*/ */
resolve(detections = []) { resolve(detections = []) {
const resolved = detections.reduce((resolved, { technology }) => { const resolved = detections.reduce((resolved, { technology, lastUrl }) => {
if ( if (
resolved.findIndex( resolved.findIndex(
({ technology: { name } }) => name === technology.name ({ technology: { name } }) => name === technology.name
@ -52,7 +52,7 @@ const Wappalyzer = {
} }
) )
resolved.push({ technology, confidence, version }) resolved.push({ technology, confidence, version, lastUrl })
} }
return resolved return resolved
@ -74,6 +74,7 @@ const Wappalyzer = {
technology: { name, slug, categories, icon, website, cpe }, technology: { name, slug, categories, icon, website, cpe },
confidence, confidence,
version, version,
lastUrl,
}) => ({ }) => ({
name, name,
slug, slug,
@ -83,6 +84,7 @@ const Wappalyzer = {
icon, icon,
website, website,
cpe, cpe,
lastUrl,
}) })
) )
}, },
@ -161,7 +163,7 @@ const Wappalyzer = {
do { do {
done = true done = true
resolved.forEach(({ technology, confidence }) => { resolved.forEach(({ technology, confidence, lastUrl }) => {
technology.implies.forEach(({ name, confidence: _confidence }) => { technology.implies.forEach(({ name, confidence: _confidence }) => {
const implied = Wappalyzer.getTechnology(name) const implied = Wappalyzer.getTechnology(name)
@ -178,6 +180,7 @@ const Wappalyzer = {
technology: implied, technology: implied,
confidence: Math.min(confidence, _confidence), confidence: Math.min(confidence, _confidence),
version: '', version: '',
lastUrl,
}) })
done = false done = false