diff --git a/src/apps.json b/src/apps.json index da3cedfe7..87b034175 100644 --- a/src/apps.json +++ b/src/apps.json @@ -1632,7 +1632,7 @@ "x-bubble-capacity-used": "", "x-bubble-perf": "" }, - "js":{ + "js": { "bubble_environment": "", "bubble_hostname_modifier": "", "bubble_version": "", @@ -10011,7 +10011,7 @@ "implies": "PHP", "website": "https://www.silverstripe.org" }, - "Simbel": { + "Simbel": { "cats": [ 6 ], diff --git a/src/drivers/npm/package.json b/src/drivers/npm/package.json index 7e55f54ee..12f3cdbe1 100644 --- a/src/drivers/npm/package.json +++ b/src/drivers/npm/package.json @@ -2,7 +2,7 @@ "name": "wappalyzer", "description": "Uncovers the technologies used on websites", "homepage": "https://github.com/AliasIO/Wappalyzer", - "version": "5.8.5", + "version": "5.9.0", "author": "Elbert Alias", "license": "GPL-3.0", "repository": { diff --git a/src/drivers/webextension/_locales/ca/messages.json b/src/drivers/webextension/_locales/ca/messages.json index 0ab2ae93c..230c1b210 100644 --- a/src/drivers/webextension/_locales/ca/messages.json +++ b/src/drivers/webextension/_locales/ca/messages.json @@ -8,6 +8,7 @@ "optionUpgradeMessage": { "message": "Avisar-me quan hi hagi una actualització disponible" }, "optionDynamicIcon": { "message": "Utilitzar la icona de la tecnologia enlloc del logotip de Wappalyzer" }, "optionTracking": { "message": "Enviar les tecnologies identificades de forma anònima a wappalyzer.com" }, + "optionThemeMode": { "message": "Habilitar la compatibilitat de la manera fosc." }, "nothingToDo": { "message": "Res a fer aquí." }, "noAppsDetected": { "message": "No s'ha detectat cap tecnologia." }, "categoryPin": { "message": "Mostrar sempre la icona" }, diff --git a/src/drivers/webextension/_locales/de/messages.json b/src/drivers/webextension/_locales/de/messages.json index a3735830c..86b804e81 100644 --- a/src/drivers/webextension/_locales/de/messages.json +++ b/src/drivers/webextension/_locales/de/messages.json @@ -8,6 +8,7 @@ "optionUpgradeMessage": { "message": "Benachrichtige mich bei Upgrades" }, "optionDynamicIcon": { "message": "Applikations Icon anstatt des Wappalyzer Icons verwenden" }, "optionTracking": { "message": "Anonyme Statistiken an wappalyzer.com übermitteln" }, + "optionThemeMode": { "message": "Aktivieren dunklen Modus Kompatibilität." }, "nothingToDo": { "message": "Nichts zu tun." }, "noAppsDetected": { "message": "Keine Applikation entdeckt." }, "categoryPin": { "message": "Immer Icon anzeigen" }, diff --git a/src/drivers/webextension/_locales/el/messages.json b/src/drivers/webextension/_locales/el/messages.json index 0076ca754..2f6b89d3e 100644 --- a/src/drivers/webextension/_locales/el/messages.json +++ b/src/drivers/webextension/_locales/el/messages.json @@ -8,6 +8,7 @@ "optionUpgradeMessage": { "message": "Ενημερώστε με για αναβαθμίσεις" }, "optionDynamicIcon": { "message": "Use application icon instead of Wappalyzer logo" }, "optionTracking": { "message": "Ανώνυμη αποστολή αναφορών για εντοπισμένες εφαρμογές στο wappalyzer.com για έρευνα" }, + "optionThemeMode": { "message": "Ενεργοποίηση συμβατότητας σκοτεινό τρόπο." }, "nothingToDo": { "message": "Καμία ενέργεια." }, "noAppsDetected": { "message": "Δεν ανιχνεύθηκαν εφαρμογές." }, "categoryPin": { "message": "Always show icon" }, diff --git a/src/drivers/webextension/_locales/en/messages.json b/src/drivers/webextension/_locales/en/messages.json index 1490c73d0..3edf9780c 100644 --- a/src/drivers/webextension/_locales/en/messages.json +++ b/src/drivers/webextension/_locales/en/messages.json @@ -8,6 +8,7 @@ "optionUpgradeMessage": { "message": "Tell me about upgrades" }, "optionDynamicIcon": { "message": "Use technology icon instead of Wappalyzer logo" }, "optionTracking": { "message": "Anonymously send identified technologies to wappalyzer.com" }, + "optionThemeMode": { "message": "Enable dark mode compatibility." }, "nothingToDo": { "message": "Nothing to do here." }, "noAppsDetected": { "message": "No technologies detected." }, "categoryPin": { "message": "Always show icon" }, diff --git a/src/drivers/webextension/_locales/es/messages.json b/src/drivers/webextension/_locales/es/messages.json index 134f044cb..c6565b7b2 100644 --- a/src/drivers/webextension/_locales/es/messages.json +++ b/src/drivers/webextension/_locales/es/messages.json @@ -8,6 +8,7 @@ "optionUpgradeMessage": { "message": "Indicarme actualizaciones" }, "optionDynamicIcon": { "message": "Use application icon instead of Wappalyzer logo" }, "optionTracking": { "message": "Enviar informes anónimos sobre las aplicaciones detectadas a wappalyzer.com para análisis" }, + "optionThemeMode": { "message": "Habilitar la compatibilidad del modo oscuro." }, "nothingToDo": { "message": "Nada que hacer aquí." }, "noAppsDetected": { "message": "Aplicaciones no detectadas." }, "categoryPin": { "message": "Always show icon" }, diff --git a/src/drivers/webextension/_locales/fa/messages.json b/src/drivers/webextension/_locales/fa/messages.json index bc2889908..d744e2893 100644 --- a/src/drivers/webextension/_locales/fa/messages.json +++ b/src/drivers/webextension/_locales/fa/messages.json @@ -8,6 +8,7 @@ "optionUpgradeMessage": { "message": "درباره ارتقا به من بگویید" }, "optionDynamicIcon": { "message": "از نماد فن آوری به جای علامت Wappalyzer استفاده شود" }, "optionTracking": { "message": "ارسال فن آوری های شناسایی شده به صورت ناشناس به wappalyzer.com" }, + "optionThemeMode": { "message": "فعال کردن حالت سازگاری تاریک." }, "nothingToDo": { "message": "هیچ چیز برای انجام اینجا نیست." }, "noAppsDetected": { "message": "هیچ فن‌آوری شناسایی نشده است." }, "categoryPin": { "message": "همیشه نماد را نشان بده" }, diff --git a/src/drivers/webextension/_locales/fr/messages.json b/src/drivers/webextension/_locales/fr/messages.json index 23dcfd19f..1acf822ff 100644 --- a/src/drivers/webextension/_locales/fr/messages.json +++ b/src/drivers/webextension/_locales/fr/messages.json @@ -3,6 +3,7 @@ "noAppsDetected": { "message": "Pas d'applications détectées." }, "nothingToDo": { "message": "Rien à faire ici." }, "optionTracking": { "message": "Envoyer anonymement des rapports sur les applications détectées à wappalyzer.com pour la recherche" }, + "optionThemeMode": { "message": "Activer la compatibilité de mode sombre." }, "optionUpgradeMessage": { "message": "M'afficher les mises à jour" }, "optionDynamicIcon": { "message": "Utiliser l'icône de l'application au lieu du logo Wappalyzer" }, "options": { "message": "Options" }, diff --git a/src/drivers/webextension/_locales/gl_ES/messages.json b/src/drivers/webextension/_locales/gl_ES/messages.json index 24fab1df7..1e6dc393f 100644 --- a/src/drivers/webextension/_locales/gl_ES/messages.json +++ b/src/drivers/webextension/_locales/gl_ES/messages.json @@ -8,6 +8,7 @@ "optionUpgradeMessage": { "message": "Infórmame se existe actualizacións" }, "optionDynamicIcon": { "message": "Amosa icono do aplicativo en lugar do de Wappalyzer" }, "optionTracking": { "message": "Envía anonimamente aplicativos identificados a wappalyzer.com" }, + "optionThemeMode": { "message": "Permitir a compatibilidade modo escuro." }, "nothingToDo": { "message": "Nada que facer por aquí." }, "noAppsDetected": { "message": "Non se identificaron aplicativos." }, "categoryPin": { "message": "Amosar sempre icono" }, diff --git a/src/drivers/webextension/_locales/gr/messages.json b/src/drivers/webextension/_locales/gr/messages.json index bb73d8c94..f0204492c 100644 --- a/src/drivers/webextension/_locales/gr/messages.json +++ b/src/drivers/webextension/_locales/gr/messages.json @@ -8,6 +8,7 @@ "optionUpgradeMessage": { "message": "Ενημερώστε με για αναβαθμίσεις" }, "optionDynamicIcon": { "message": "Use application icon instead of Wappalyzer logo" }, "optionTracking": { "message": "Ανώνυμη αποστολή αναφορών για εντοπισμένες εφαρμογές στο wappalyzer.com για έρευνα" }, + "optionThemeMode": { "message": "Ενεργοποίηση συμβατότητας σκοτεινό τρόπο." }, "nothingToDo": { "message": "Καμία ενέργεια." }, "noAppsDetected": { "message": "Δεν ανιχνεύθηκαν εφαρμογές." }, "categoryPin": { "message": "Always show icon" }, diff --git a/src/drivers/webextension/_locales/id/messages.json b/src/drivers/webextension/_locales/id/messages.json index 1d5f7c2f3..26834b8d5 100644 --- a/src/drivers/webextension/_locales/id/messages.json +++ b/src/drivers/webextension/_locales/id/messages.json @@ -8,6 +8,7 @@ "optionUpgradeMessage": { "message": "Beritahu Tentang Peningkatan Versi" }, "optionDynamicIcon": { "message": "Gunakan ikon aplikasi dan bukan logo Wappalyzer" }, "optionTracking": { "message": "Secara anonim kirimkan laporan tentang aplikasi yang terdeteksi ke wappalyzer.com untuk penelitian" }, + "optionThemeMode": { "message": "Aktifkan kompatibilitas modus gelap." }, "nothingToDo": { "message": "Tak ada yang dilakukan disini." }, "noAppsDetected": { "message": "Tidak ada aplikasi yang terdeteksi." }, "categoryPin": { "message": "Always show icon" }, diff --git a/src/drivers/webextension/_locales/it/messages.json b/src/drivers/webextension/_locales/it/messages.json index 171cc6c32..c579c112b 100644 --- a/src/drivers/webextension/_locales/it/messages.json +++ b/src/drivers/webextension/_locales/it/messages.json @@ -8,6 +8,7 @@ "optionUpgradeMessage": { "message": "Parlami dell'upgrade" }, "optionDynamicIcon": { "message": "Use application icon instead of Wappalyzer logo" }, "optionTracking": { "message": "Inviare anonimamente un report sulle applicazioni rilevate a wappalyzer.com per l'analisi" }, + "optionThemeMode": { "message": "Abilita compatibilità con la modalità scura." }, "nothingToDo": { "message": "Niente da fare qui." }, "noAppsDetected": { "message": "Nessuna applicazione rilevata." }, "categoryPin": { "message": "Always show icon" }, diff --git a/src/drivers/webextension/_locales/ja/messages.json b/src/drivers/webextension/_locales/ja/messages.json index 0212fa461..d91e50c07 100644 --- a/src/drivers/webextension/_locales/ja/messages.json +++ b/src/drivers/webextension/_locales/ja/messages.json @@ -8,6 +8,8 @@ "optionUpgradeMessage": { "message": "アップデート内容を通知する" }, "optionDynamicIcon": { "message": "Wappalyzerロゴの代わりに技術アイコンを使用する" }, "optionTracking": { "message": "特定した技術を匿名でwappalyzer.comに送信する" }, + "optionThemeMode": { "message": "Enable dark mode compatibility." }, + "optionThemeMode": { "message": "" }, "nothingToDo": { "message": "ここでは特定出来ません。" }, "noAppsDetected": { "message": "技術は検出されませんでした。" }, "categoryPin": { "message": "常にアイコンを表示" }, diff --git a/src/drivers/webextension/_locales/pl/messages.json b/src/drivers/webextension/_locales/pl/messages.json index 2e5b0df13..27d261e54 100644 --- a/src/drivers/webextension/_locales/pl/messages.json +++ b/src/drivers/webextension/_locales/pl/messages.json @@ -8,6 +8,7 @@ "optionUpgradeMessage": { "message": "Powiadamiaj mnie o aktualizacjach" }, "optionDynamicIcon": { "message": "Używaj loga aplikacji zamiast Wappalyzer" }, "optionTracking": { "message": "Przesyłaj anonimowe statystyki aplikacji wykrytych przez Wappalyzer do twórców" }, + "optionThemeMode": { "message": "Włącz ciemną kompatybilność trybu." }, "nothingToDo": { "message": "Nic tu nie ma." }, "noAppsDetected": { "message": "Nie wykryto żadnych aplikacji." }, "categoryPin": { "message": "Zawsze pokazuj tą ikonę" }, diff --git a/src/drivers/webextension/_locales/pt/messages.json b/src/drivers/webextension/_locales/pt/messages.json index 896b8f91f..03b415849 100644 --- a/src/drivers/webextension/_locales/pt/messages.json +++ b/src/drivers/webextension/_locales/pt/messages.json @@ -4,6 +4,7 @@ "nothingToDo": { "message": "Nada a fazer aqui." }, "optionDynamicIcon": { "message": "Utilizar o ícone da tecnologia em vez do logótipo do Wappalyzer" }, "optionTracking": { "message": "Envie anonimamente tecnologias identificadas para wappalyzer.com" }, + "optionThemeMode": { "message": "Permitir a compatibilidade modo escuro." }, "optionUpgradeMessage": { "message": "Fale-me sobre actualizações" }, "options": { "message": "Opções" }, "optionsSave": { "message": "Opções de Guardar" }, diff --git a/src/drivers/webextension/_locales/pt_BR/messages.json b/src/drivers/webextension/_locales/pt_BR/messages.json index 733db1710..8b42ae1ef 100644 --- a/src/drivers/webextension/_locales/pt_BR/messages.json +++ b/src/drivers/webextension/_locales/pt_BR/messages.json @@ -8,6 +8,7 @@ "optionUpgradeMessage": { "message": "Atualizações automáticas" }, "optionDynamicIcon": { "message": "Utilizar o ícone da tecnologia ao invés da logo do Wappalyzer" }, "optionTracking": { "message": "Enviar relatórios anônimos para wappalyzer.com sobre tecnologias identificadas" }, + "optionThemeMode": { "message": "Permitir a compatibilidade modo escuro." }, "nothingToDo": { "message": "Nada a fazer aqui." }, "noAppsDetected": { "message": "Nenhuma tecnologia identificada." }, "categoryPin": { "message": "Sempre mostrar ícone" }, diff --git a/src/drivers/webextension/_locales/ro/messages.json b/src/drivers/webextension/_locales/ro/messages.json index 14e832699..909af4fe9 100644 --- a/src/drivers/webextension/_locales/ro/messages.json +++ b/src/drivers/webextension/_locales/ro/messages.json @@ -8,6 +8,7 @@ "optionUpgradeMessage": { "message": "Anunță-mă dacă sunt actualizări" }, "optionDynamicIcon": { "message": "Foloseşte icon-ul aplicaţiei în locul logo-ului Wappalyzer" }, "optionTracking": { "message": "Trimite rapoarte anonime despre aplicațiile detectate către wappalyzer.com pentru cercetare" }, + "optionThemeMode": { "message": "Activează modul de compatibilitate întuneric." }, "nothingToDo": { "message": "Nimic de făcut pe pagina curentă." }, "noAppsDetected": { "message": "Nici o aplicație detectată." }, "categoryPin": { "message": "Afișează icon tot timpul" }, diff --git a/src/drivers/webextension/_locales/ru/messages.json b/src/drivers/webextension/_locales/ru/messages.json index 9438baef7..39b57d5af 100644 --- a/src/drivers/webextension/_locales/ru/messages.json +++ b/src/drivers/webextension/_locales/ru/messages.json @@ -56,6 +56,7 @@ "noAppsDetected": { "message": "Нет данных о сайте" }, "nothingToDo": { "message": "Тут нечего искать" }, "optionTracking": { "message": "Анонимно отправлять статистику распознанных данных на сервер (для исследований)" }, + "optionThemeMode": { "message": "Включити сумісність темного режиму." }, "optionDynamicIcon": { "message": "Использовать значок приложения вместо логотипа Wappalyzer" }, "optionUpgradeMessage": { "message": "Оповещать меня об обновлениях" }, "options": { "message": "Настройки" }, diff --git a/src/drivers/webextension/_locales/sk/messages.json b/src/drivers/webextension/_locales/sk/messages.json index b9ee93169..7975aeceb 100644 --- a/src/drivers/webextension/_locales/sk/messages.json +++ b/src/drivers/webextension/_locales/sk/messages.json @@ -8,6 +8,7 @@ "optionUpgradeMessage": { "message": "Povedzte mi o upgradoch" }, "optionDynamicIcon": { "message": "Použiť ikonu aplikácie namiesto loga Wappalyzer" }, "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." }, "nothingToDo": { "message": "Nie je tu čo robiť." }, "noAppsDetected": { "message": "Žiadne aplikácie neboli zistené." }, "categoryPin": { "message": "Always show icon" }, diff --git a/src/drivers/webextension/_locales/tr/messages.json b/src/drivers/webextension/_locales/tr/messages.json index ed00ade77..032658adf 100644 --- a/src/drivers/webextension/_locales/tr/messages.json +++ b/src/drivers/webextension/_locales/tr/messages.json @@ -8,6 +8,7 @@ "optionUpgradeMessage": { "message": "Güncellemeleri göster" }, "optionDynamicIcon": { "message": "Wappalyzer logosu yerine uygulama simgesi kullan" }, "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." }, "nothingToDo": { "message": "Burada yapacak birşey yok." }, "noAppsDetected": { "message": "Uygulamalar tespit edilemedi." }, "categoryPin": { "message": "Her zaman bu kategorinin ikonunu kullan" }, diff --git a/src/drivers/webextension/_locales/uk/messages.json b/src/drivers/webextension/_locales/uk/messages.json index 5f6b8089d..04d0efcc2 100644 --- a/src/drivers/webextension/_locales/uk/messages.json +++ b/src/drivers/webextension/_locales/uk/messages.json @@ -8,6 +8,7 @@ "optionUpgradeMessage": { "message": "Сповіщати про оновлення" }, "optionDynamicIcon": { "message": "Використовувати значок застосунку замість логотипу Wappalyzer" }, "optionTracking": { "message": "Анонімно надсилати статистику розпізнавань на сервер для досліджень" }, + "optionThemeMode": { "message": "Включити сумісність темного режиму." }, "nothingToDo": { "message": "Тут нічого робити." }, "noAppsDetected": { "message": "Нічого не знайдено." }, "categoryPin": { "message": "Always show icon" }, diff --git a/src/drivers/webextension/_locales/uz/messages.json b/src/drivers/webextension/_locales/uz/messages.json index edd7df369..fde8d6227 100644 --- a/src/drivers/webextension/_locales/uz/messages.json +++ b/src/drivers/webextension/_locales/uz/messages.json @@ -8,6 +8,7 @@ "optionUpgradeMessage": { "message": "Yangilanishlar haqida habar berish" }, "optionDynamicIcon": { "message": "Wappalyzer logotipi o'rnida dastur logotipidan foydalanish" }, "optionTracking": { "message": "Wappalyzer takomillashtirish uchun hisobotlarni maxfiy ravishda serverga jo'natish" }, + "optionThemeMode": { "message": "qorong'i rejimi mosligini yoqish." }, "nothingToDo": { "message": "Bu yerda tekshirib bolmaydi." }, "noAppsDetected": { "message": "Hech qanday dastur aniqlanmadi." }, "categoryPin": { "message": "Always show icon" }, diff --git a/src/drivers/webextension/_locales/zh_CN/messages.json b/src/drivers/webextension/_locales/zh_CN/messages.json index 6ca65def1..1ddbfa35f 100644 --- a/src/drivers/webextension/_locales/zh_CN/messages.json +++ b/src/drivers/webextension/_locales/zh_CN/messages.json @@ -8,6 +8,7 @@ "optionUpgradeMessage": { "message": "通知我更新详情" }, "optionDynamicIcon": { "message": "使用应用程序而非 Wappalyzer 的标志" }, "optionTracking": { "message": "发送匿名的应用报告到 wappalyzer.com 供研究使用" }, + "optionThemeMode": { "message": "启用暗模式的兼容性。" }, "nothingToDo": { "message": "这儿啥也没有。" }, "noAppsDetected": { "message": "未检测到任何技术。" }, "categoryPin": { "message": "总是显示图标" }, diff --git a/src/drivers/webextension/_locales/zh_TW/messages.json b/src/drivers/webextension/_locales/zh_TW/messages.json index b388bec27..0de6ab4fa 100644 --- a/src/drivers/webextension/_locales/zh_TW/messages.json +++ b/src/drivers/webextension/_locales/zh_TW/messages.json @@ -8,6 +8,7 @@ "optionUpgradeMessage": { "message": "通知我更新內容" }, "optionDynamicIcon": { "message": "使用網頁中使用技術的圖示取代 Wappalyzer 的標誌" }, "optionTracking": { "message": "匿名傳送已識別的技術至 wappalyzer.com" }, + "optionThemeMode": { "message": "啟用暗模式的兼容性。" }, "nothingToDo": { "message": "這裡什麼也沒有。" }, "noAppsDetected": { "message": "未識別到技術。" }, "categoryPin": { "message": "永遠顯示圖示" }, diff --git a/src/drivers/webextension/css/popup.css b/src/drivers/webextension/css/popup.css index 623ac6772..cf02b5280 100644 --- a/src/drivers/webextension/css/popup.css +++ b/src/drivers/webextension/css/popup.css @@ -201,56 +201,49 @@ body { } /* Add alternative color palette for Dark mode theme. */ -@media (prefers-color-scheme: dark) { - body { - background: linear-gradient(160deg, #32067c, #150233); - } - - .header { - border-bottom: 1px solid #000; - } - - .header__logo--dark { - display: inline-block; - } - - .header__logo--light { - display: none; - } - - .container { - color: white; - } - - .detected__category-link, .detected__app { - color: white; - } - - .detected__category-link:hover { - color: white; - border-bottom: 1px solid white; - } - - .detected__app-icon { - -webkit-filter: drop-shadow(0px 0px 1px rgba(255,255,255,1)); - filter: drop-shadow(0px 0px 1px rgba(255,255,255,1)); - } - - .detected__app-version, .detected__app-confidence { - background-color: #4608ad; - } - - .detected__app:hover .detected__app-name { - border-bottom: 1px solid white; - } - - .detected__app:hover .detected__app-version, - .detected__app:hover .detected__app-confidence { - border-bottom: none; - } - - .terms__accept, - .terms__privacy { - color: white; - } +body.theme-mode-sync { + background: linear-gradient(160deg, #32067c, #150233); +} + +.theme-mode-sync .header { + border-bottom: 1px solid #000; +} + +.theme-mode-sync .header__logo--dark { + display: inline-block; +} + +.theme-mode-sync .header__logo--light { + display: none; +} + +.theme-mode-sync .container { + color: white; +} + +.theme-mode-sync .detected__category-link, .theme-mode-sync .detected__app { + color: white; +} + +.theme-mode-sync .detected__category-link:hover { + color: white; + border-bottom: 1px solid white; +} + +.theme-mode-sync .detected__app-version, .theme-mode-sync .detected__app-confidence { + background-color: #4608ad; +} + +.theme-mode-sync .detected__app:hover .detected__app-name { + border-bottom: 1px solid white; +} + +.theme-mode-sync .detected__app:hover .theme-mode-sync .detected__app-version, +.theme-mode-sync .detected__app:hover .theme-mode-sync .detected__app-confidence { + border-bottom: none; +} + +.theme-mode-sync .terms__accept, +.theme-mode-sync .terms__privacy { + color: white; } diff --git a/src/drivers/webextension/html/options.html b/src/drivers/webextension/html/options.html index 7ec91299a..a10e8a859 100644 --- a/src/drivers/webextension/html/options.html +++ b/src/drivers/webextension/html/options.html @@ -40,6 +40,10 @@ Anonymously send reports on detected applications to wappalyzer.com for research +

diff --git a/src/drivers/webextension/js/driver.js b/src/drivers/webextension/js/driver.js index 327d31717..71add9c5e 100644 --- a/src/drivers/webextension/js/driver.js +++ b/src/drivers/webextension/js/driver.js @@ -190,6 +190,13 @@ browser.runtime.onConnect.addListener((port) => { patterns: wappalyzer.jsPatterns, }; + break; + case 'update_theme_mode': + // Sync theme mode to popup. + response = { + themeMode: await getOption('themeMode', false), + }; + break; default: // Do nothing diff --git a/src/drivers/webextension/js/options.js b/src/drivers/webextension/js/options.js index 4666b0045..03c6ae504 100644 --- a/src/drivers/webextension/js/options.js +++ b/src/drivers/webextension/js/options.js @@ -93,4 +93,13 @@ document.addEventListener('DOMContentLoaded', async () => { el.checked = value; el.addEventListener('change', e => setOption('tracking', e.target.checked)); + + // Theme Mode + value = await getOption('themeMode', false); + + el = document.querySelector('#option-theme-mode'); + + el.checked = value; + + el.addEventListener('change', e => setOption('themeMode', e.target.checked)); }); diff --git a/src/drivers/webextension/js/popup.js b/src/drivers/webextension/js/popup.js index 42ed70089..cf5d2d95d 100644 --- a/src/drivers/webextension/js/popup.js +++ b/src/drivers/webextension/js/popup.js @@ -205,6 +205,28 @@ async function getApps() { } } +/** + * Async function to update body class based on option. + */ +async function getThemeMode() { + try { + port.postMessage({ + id: 'update_theme_mode', + }); + } catch (error) { + console.error(error); // eslint-disable-line no-console + } +} + +/** + * Update theme mode based on browser option. + * @param {object} res Response from port listener. + */ +function updateThemeMode(res) { + if (res.hasOwnProperty('themeMode') && res.themeMode !== false) { + document.body.classList.add('theme-mode-sync'); + } +} function displayApps(response) { pinnedCategory = response.pinnedCategory; // eslint-disable-line prefer-destructuring termsAccepted = response.termsAccepted; // eslint-disable-line prefer-destructuring @@ -237,10 +259,15 @@ port.onMessage.addListener((message) => { case 'get_apps': displayApps(message.response); + break; + case 'update_theme_mode': + updateThemeMode(message.response); + break; default: // Do nothing } }); +getThemeMode(); getApps(); diff --git a/src/drivers/webextension/manifest.json b/src/drivers/webextension/manifest.json index 0f13fb57e..b5a529987 100644 --- a/src/drivers/webextension/manifest.json +++ b/src/drivers/webextension/manifest.json @@ -4,7 +4,7 @@ "author": "Elbert Alias", "homepage_url": "https://www.wappalyzer.com", "description": "Identify web technologies", - "version": "5.8.5", + "version": "5.9.0", "default_locale": "en", "manifest_version": 2, "icons": {