diff --git a/CODEOWNERS b/CODEOWNERS
index 0ec6fd468..15b146e0f 100644
--- a/CODEOWNERS
+++ b/CODEOWNERS
@@ -10,7 +10,7 @@
/src/classes/CMP.js @christophertino
/src/classes/EventHandlers.js @christophertino
/src/classes/Metrics.js @wlycdgr
-/src/classes/PolicySmartBlock.js @christophertino
+/src/classes/PolicySmartBrowse.js @christophertino
/src/classes/Conf.js @christophertino
/src/classes/ConfData.js @christophertino
/src/classes/PanelData.js @wlycdgr
diff --git a/_locales/de/messages.json b/_locales/de/messages.json
index a5361c941..b854e4d5a 100644
--- a/_locales/de/messages.json
+++ b/_locales/de/messages.json
@@ -674,7 +674,7 @@
"panel_tracker_warning_slow_tooltip": {
"message": "Der Tracker ist langsam"
},
- "panel_tracker_warning_smartblock_tooltip": {
+ "panel_tracker_warning_smartbrowse_tooltip": {
"message": "Tracker von Smart Blocking blockiert"
},
"panel_tracker_warning_smartunblock_tooltip": {
@@ -1145,10 +1145,10 @@
"alert_ad_block_off": {
"message": "Erweiterter Werbeblocker AUS. Werbung wird nicht gesperrt."
},
- "alert_smart_block_on": {
+ "alert_smart_browse_on": {
"message": "Smart Blocking AN. Tracker-Blockierung wird angepasst, um die Seitenleistung zu optimieren."
},
- "alert_smart_block_off": {
+ "alert_smart_browse_off": {
"message": "Smart Blocking AUS. Tracker-Blockierung wird nicht automatisch angepasst."
},
"alert_reload": {
@@ -1175,7 +1175,7 @@
"tooltip_ad_block_on": {
"message": "Werbung wurde gesperrt."
},
- "tooltip_smart_block_on": {
+ "tooltip_smart_browse_on": {
"message": "Tracker-Blockierung wurde angepasst, um die Seitenleistung zu optimieren."
},
"tooltip_trust": {
@@ -2464,10 +2464,10 @@
"enhanced_ad_blocking": {
"message": "Besserer Werbeblocker"
},
- "smart_blocking": {
+ "smart_browsing": {
"message": "Smart Blocking"
},
- "smart_blocking_DESC": {
+ "smart_browsing_DESC": {
"message": "Tracker automatisch blockieren und entsperren, um die Seitenperformance zu optimieren."
},
"ad_blocking_DESC": {
diff --git a/_locales/en/messages.json b/_locales/en/messages.json
index 7da0073aa..e9b14b92f 100644
--- a/_locales/en/messages.json
+++ b/_locales/en/messages.json
@@ -674,11 +674,11 @@
"panel_tracker_warning_slow_tooltip": {
"message": "Tracker is slow"
},
- "panel_tracker_warning_smartblock_tooltip": {
- "message": "Tracker blocked by Smart Blocking"
+ "panel_tracker_warning_smartbrowse_tooltip": {
+ "message": "Tracker blocked by Smart-Browsing"
},
"panel_tracker_warning_smartunblock_tooltip": {
- "message": "Tracker unblocked by Smart Blocking"
+ "message": "Tracker unblocked by Smart-Browsing"
},
"panel_tracker_block_tooltip": {
"message": "Block on all sites"
@@ -807,10 +807,10 @@
"message": "This site is already whitelisted."
},
"settings_adblocker": {
- "message": "Ad Block Lists"
+ "message": "Ad-Block Lists"
},
"settings_adblocker_lists": {
- "message": "Load the following Ad Block filter lists:"
+ "message": "Load the following ad-block filter lists:"
},
"settings_adblocker_list_1": {
"message": "Ads only"
@@ -1065,7 +1065,7 @@
"message": "Requests Modified:"
},
"requests_modified_tooltip": {
- "message": "Total number of tracking requests & elements modified by Anti-Tracking and Ad Blocking"
+ "message": "Total number of tracking requests & elements modified by Anti-Tracking and Ad-Blocking"
},
"trackers_blocked": {
"message": "Trackers Blocked:"
@@ -1134,22 +1134,22 @@
"message": "Ghostery extension has been resumed."
},
"alert_anti_track_on": {
- "message": "Enhanced Anti-Tracking ON. Personal data will be anonymized."
+ "message": "Anti-Tracking ON. Personal data will be anonymized."
},
"alert_anti_track_off": {
- "message": "Enhanced Anti-Tracking OFF. Personal data will not be anonymized."
+ "message": "Anti-Tracking OFF. Personal data will not be anonymized."
},
"alert_ad_block_on": {
- "message": "Enhanced Ad-Blocking ON. Advertisements will be blocked."
+ "message": "Ad-Blocking ON. Advertisements will be blocked."
},
"alert_ad_block_off": {
- "message": "Enhanced Ad-Blocking OFF. Advertisements will not be blocked."
+ "message": "Ad-Blocking OFF. Advertisements will not be blocked."
},
- "alert_smart_block_on": {
- "message": "Smart Blocking ON. Tracker blocking will be adjusted to optimize page performance."
+ "alert_smart_browse_on": {
+ "message": "Smart-Browsing ON. Tracker blocking will be adjusted to optimize page performance."
},
- "alert_smart_block_off": {
- "message": "Smart Blocking OFF. Tracker blocking will not be automatically adjusted."
+ "alert_smart_browse_off": {
+ "message": "Smart-Browsing OFF. Tracker blocking will not be automatically adjusted."
},
"alert_reload": {
"message": "Reload to see changes."
@@ -1175,7 +1175,7 @@
"tooltip_ad_block_on": {
"message": "Advertisements have been blocked."
},
- "tooltip_smart_block_on": {
+ "tooltip_smart_browse_on": {
"message": "Tracker blocking adjusted to optimize page performance."
},
"tooltip_trust": {
@@ -2150,8 +2150,8 @@
"ghostery_rewards": {
"message": "ghostery rewards"
},
- "enhanced_anti_tracking": {
- "message": "Enhanced Anti-Tracking"
+ "anti_tracking": {
+ "message": "Anti-Tracking"
},
"panel_rewards_view__reward": {
"message": "Reward"
@@ -2461,13 +2461,13 @@
"off": {
"message": "Off"
},
- "enhanced_ad_blocking": {
- "message": "Enhanced Ad Blocking"
+ "ad_blocking": {
+ "message": "Ad-Blocking"
},
- "smart_blocking": {
- "message": "Smart Blocking"
+ "smart_browsing": {
+ "message": "Smart-Browsing"
},
- "smart_blocking_DESC": {
+ "smart_browsing_DESC": {
"message": "Automatically block and unblock trackers to optimize page performance."
},
"ad_blocking_DESC": {
diff --git a/_locales/es/messages.json b/_locales/es/messages.json
index 4fe8dc2d6..f6613e0db 100644
--- a/_locales/es/messages.json
+++ b/_locales/es/messages.json
@@ -674,7 +674,7 @@
"panel_tracker_warning_slow_tooltip": {
"message": "El rastreador es lento"
},
- "panel_tracker_warning_smartblock_tooltip": {
+ "panel_tracker_warning_smartbrowse_tooltip": {
"message": "Rastreador bloqueado por el bloqueador inteligente"
},
"panel_tracker_warning_smartunblock_tooltip": {
@@ -1145,10 +1145,10 @@
"alert_ad_block_off": {
"message": "Bloqueo de anuncios mejorado NO No se bloquearán los anuncios."
},
- "alert_smart_block_on": {
+ "alert_smart_browse_on": {
"message": "Bloqueo inteligente SÍ. Se ajustará automáticamente el bloqueador de rastreadores para optimizar el rendimiento de la página."
},
- "alert_smart_block_off": {
+ "alert_smart_browse_off": {
"message": "Bloqueo inteligente NO. No se ajustará automáticamente el bloqueo de rastreadores."
},
"alert_reload": {
@@ -1175,7 +1175,7 @@
"tooltip_ad_block_on": {
"message": "Se ha bloqueado el anuncio."
},
- "tooltip_smart_block_on": {
+ "tooltip_smart_browse_on": {
"message": "Se ajustará el bloqueador de rastreadores para optimizar el rendimiento de la página."
},
"tooltip_trust": {
@@ -2464,10 +2464,10 @@
"enhanced_ad_blocking": {
"message": "Bloqueador de anuncios avanzado"
},
- "smart_blocking": {
+ "smart_browsing": {
"message": "Bloqueo inteligente"
},
- "smart_blocking_DESC": {
+ "smart_browsing_DESC": {
"message": "Bloquea y desbloquea automáticamente los rastreadores para optimizar el rendimiento de la página."
},
"ad_blocking_DESC": {
diff --git a/_locales/fr/messages.json b/_locales/fr/messages.json
index 07706b3f6..32cba8007 100644
--- a/_locales/fr/messages.json
+++ b/_locales/fr/messages.json
@@ -674,7 +674,7 @@
"panel_tracker_warning_slow_tooltip": {
"message": "Le mouchard est lent"
},
- "panel_tracker_warning_smartblock_tooltip": {
+ "panel_tracker_warning_smartbrowse_tooltip": {
"message": "Outil de pistage bloqué par Smart Blocking"
},
"panel_tracker_warning_smartunblock_tooltip": {
@@ -1145,10 +1145,10 @@
"alert_ad_block_off": {
"message": "Blocage amélioré des publicités DÉSACTIVÉ Les publicités ne seront pas bloquées."
},
- "alert_smart_block_on": {
+ "alert_smart_browse_on": {
"message": "Blocage intelligent ACTIVÉ. Le blocage des mouchards sera ajusté pour améliorer les performances de la page."
},
- "alert_smart_block_off": {
+ "alert_smart_browse_off": {
"message": "Blocage intelligent DÉSACTIVÉ. Le blocage des mouchards ne sera pas ajusté automatiquement."
},
"alert_reload": {
@@ -1175,7 +1175,7 @@
"tooltip_ad_block_on": {
"message": "Les publicités ont été bloquées."
},
- "tooltip_smart_block_on": {
+ "tooltip_smart_browse_on": {
"message": "Blocage des mouchards ajusté pour améliorer les performances de la page."
},
"tooltip_trust": {
@@ -2464,10 +2464,10 @@
"enhanced_ad_blocking": {
"message": "Blocage amélioré des publicités"
},
- "smart_blocking": {
+ "smart_browsing": {
"message": "Blocage intelligent"
},
- "smart_blocking_DESC": {
+ "smart_browsing_DESC": {
"message": "Bloquer et débloquer automatiquement les mouchards pour optimiser les performances des pages."
},
"ad_blocking_DESC": {
diff --git a/_locales/hu/messages.json b/_locales/hu/messages.json
index 51b7534ad..83669ee0c 100644
--- a/_locales/hu/messages.json
+++ b/_locales/hu/messages.json
@@ -674,7 +674,7 @@
"panel_tracker_warning_slow_tooltip": {
"message": "A tracker lassú"
},
- "panel_tracker_warning_smartblock_tooltip": {
+ "panel_tracker_warning_smartbrowse_tooltip": {
"message": "Tracker blokkolva az Okos Blokkolás (Smart Blocking) által"
},
"panel_tracker_warning_smartunblock_tooltip": {
@@ -1145,10 +1145,10 @@
"alert_ad_block_off": {
"message": "Fejlesztett hirdetésblokkolás KI van kapcsolva A hirdetések nem lesznek kiszűrve."
},
- "alert_smart_block_on": {
+ "alert_smart_browse_on": {
"message": "Okos blokkolás BE van kapcsolva. A tracker-szűrés az oldal teljesítményének optimalizálására lesz beállítva."
},
- "alert_smart_block_off": {
+ "alert_smart_browse_off": {
"message": "Okos blokkolás KI van kapcsolva. A tracker-szűrés nem lesz automatikusan beállítva."
},
"alert_reload": {
@@ -1175,7 +1175,7 @@
"tooltip_ad_block_on": {
"message": "A hirdetések ki lesznek kiszűrve."
},
- "tooltip_smart_block_on": {
+ "tooltip_smart_browse_on": {
"message": "A tracker-szűrés az oldal teljesítményének optimalizálására van beállítva."
},
"tooltip_trust": {
@@ -2464,10 +2464,10 @@
"enhanced_ad_blocking": {
"message": "Fejlesztett hirdetésblokkolás"
},
- "smart_blocking": {
+ "smart_browsing": {
"message": "Okos blokkolás"
},
- "smart_blocking_DESC": {
+ "smart_browsing_DESC": {
"message": "Automatikusan blokkolja vagy feloldja a trackereket az oldal teljesítményének optimalizálásához."
},
"ad_blocking_DESC": {
diff --git a/_locales/it/messages.json b/_locales/it/messages.json
index 28ac61039..00bcc66c1 100644
--- a/_locales/it/messages.json
+++ b/_locales/it/messages.json
@@ -674,7 +674,7 @@
"panel_tracker_warning_slow_tooltip": {
"message": "Il tracker è lento"
},
- "panel_tracker_warning_smartblock_tooltip": {
+ "panel_tracker_warning_smartbrowse_tooltip": {
"message": "Tracker bloccato da Blocco Intelligente"
},
"panel_tracker_warning_smartunblock_tooltip": {
@@ -1145,10 +1145,10 @@
"alert_ad_block_off": {
"message": "Blocco delle Pubblicità Avanzato DISATTIVATO. Le pubblicità non verranno bloccate."
},
- "alert_smart_block_on": {
+ "alert_smart_browse_on": {
"message": "Blocco Intelligente ATTIVO. Il blocco dei tracker verrà regolato per ottimizzare le prestazioni della pagina."
},
- "alert_smart_block_off": {
+ "alert_smart_browse_off": {
"message": "Blocco Intelligente DISATTIVATO. Il blocco dei tracker non verrà regolato automaticamente."
},
"alert_reload": {
@@ -1175,7 +1175,7 @@
"tooltip_ad_block_on": {
"message": "Le pubblicità sono state bloccate."
},
- "tooltip_smart_block_on": {
+ "tooltip_smart_browse_on": {
"message": "Il blocco dei tracker è stato regolato per ottimizzare le prestazioni della pagina."
},
"tooltip_trust": {
@@ -2464,10 +2464,10 @@
"enhanced_ad_blocking": {
"message": "Blocco delle Pubblicità Avanzato"
},
- "smart_blocking": {
+ "smart_browsing": {
"message": "Blocco Intelligente"
},
- "smart_blocking_DESC": {
+ "smart_browsing_DESC": {
"message": "Blocca e sblocca automaticamente i tracker per ottimizzare la prestazione della pagina."
},
"ad_blocking_DESC": {
diff --git a/_locales/ja/messages.json b/_locales/ja/messages.json
index 93e118f67..8046255af 100644
--- a/_locales/ja/messages.json
+++ b/_locales/ja/messages.json
@@ -674,7 +674,7 @@
"panel_tracker_warning_slow_tooltip": {
"message": "トラッカーが遅いです"
},
- "panel_tracker_warning_smartblock_tooltip": {
+ "panel_tracker_warning_smartbrowse_tooltip": {
"message": "トラッカーがスマート・ブロッキングによってブロックされました"
},
"panel_tracker_warning_smartunblock_tooltip": {
@@ -1145,10 +1145,10 @@
"alert_ad_block_off": {
"message": "強化された広告ブロッキングがオフになりました。広告はブロックされません。"
},
- "alert_smart_block_on": {
+ "alert_smart_browse_on": {
"message": "スマート・ブロッキングがオンになりました。ページのパフォーマンスを最適化するために、トラッカー・ブロッキングを調整します。"
},
- "alert_smart_block_off": {
+ "alert_smart_browse_off": {
"message": "スマート・ブロッキングがオフになりました。トラッカー・ブロッキングは自動的に調整されません。"
},
"alert_reload": {
@@ -1175,7 +1175,7 @@
"tooltip_ad_block_on": {
"message": "広告がブロックされました。"
},
- "tooltip_smart_block_on": {
+ "tooltip_smart_browse_on": {
"message": "ページのパフォーマンスを最適化するために、トラッカー・ブロッキングを調整しました。"
},
"tooltip_trust": {
@@ -2464,10 +2464,10 @@
"enhanced_ad_blocking": {
"message": "強化された広告ブロッキング"
},
- "smart_blocking": {
+ "smart_browsing": {
"message": "スマート・ブロッキング"
},
- "smart_blocking_DESC": {
+ "smart_browsing_DESC": {
"message": "トラッカーを自動的にブロックおよびブロック解除して、ページのパフォーマンスを最適化します。"
},
"ad_blocking_DESC": {
diff --git a/_locales/ko/messages.json b/_locales/ko/messages.json
index 2682b8e3d..8e8b01f41 100644
--- a/_locales/ko/messages.json
+++ b/_locales/ko/messages.json
@@ -674,7 +674,7 @@
"panel_tracker_warning_slow_tooltip": {
"message": "느린 "
},
- "panel_tracker_warning_smartblock_tooltip": {
+ "panel_tracker_warning_smartbrowse_tooltip": {
"message": "스마트 차단 기능으로 트래커 차단됨"
},
"panel_tracker_warning_smartunblock_tooltip": {
@@ -1145,10 +1145,10 @@
"alert_ad_block_off": {
"message": "강화된 광고 차단 꺼짐 광고가 차단되지 않습니다."
},
- "alert_smart_block_on": {
+ "alert_smart_browse_on": {
"message": "스마트 차단 켜짐. 트래커 차단 기능이 페이지 성능을 최적화할 수 있도록 조정됩니다."
},
- "alert_smart_block_off": {
+ "alert_smart_browse_off": {
"message": "스마트 차단 꺼짐. 트래커 차단 기능이 자동으로 조정되지 않습니다."
},
"alert_reload": {
@@ -1175,7 +1175,7 @@
"tooltip_ad_block_on": {
"message": "광고가 차단되었습니다."
},
- "tooltip_smart_block_on": {
+ "tooltip_smart_browse_on": {
"message": "트래커 차단 기능이 페이지 성능을 최적화할 수 있도록 조정되었습니다."
},
"tooltip_trust": {
@@ -2464,10 +2464,10 @@
"enhanced_ad_blocking": {
"message": "강화된 광고 차단 "
},
- "smart_blocking": {
+ "smart_browsing": {
"message": "스마트 차단 "
},
- "smart_blocking_DESC": {
+ "smart_browsing_DESC": {
"message": "트래커를 자동으로 차단 및 차단 해제하여 페이지 성능을 최적화합니다."
},
"ad_blocking_DESC": {
diff --git a/_locales/nl/messages.json b/_locales/nl/messages.json
index 0ace297c7..d2db915f7 100644
--- a/_locales/nl/messages.json
+++ b/_locales/nl/messages.json
@@ -674,7 +674,7 @@
"panel_tracker_warning_slow_tooltip": {
"message": "Tracker is langzaam"
},
- "panel_tracker_warning_smartblock_tooltip": {
+ "panel_tracker_warning_smartbrowse_tooltip": {
"message": "Tracker geblokkeerd door Smart Blocking"
},
"panel_tracker_warning_smartunblock_tooltip": {
@@ -1145,10 +1145,10 @@
"alert_ad_block_off": {
"message": "Versterkte Ad Blokkering UIT. Advertenties zullen niet worden geblokkeerd."
},
- "alert_smart_block_on": {
+ "alert_smart_browse_on": {
"message": "Slim Blokkeren AAN. Tracker blokkering wordt aangepast om prestaties van de pagina te optimaliseren."
},
- "alert_smart_block_off": {
+ "alert_smart_browse_off": {
"message": "Slim Blokkeren UIT. Tracker blokkering zal niet automatisch worden aangepast."
},
"alert_reload": {
@@ -1175,7 +1175,7 @@
"tooltip_ad_block_on": {
"message": "Advertenties zijn geblokkeerd."
},
- "tooltip_smart_block_on": {
+ "tooltip_smart_browse_on": {
"message": "Tracker blokkering aangepast om prestaties van de pagina te optimaliseren."
},
"tooltip_trust": {
@@ -2464,10 +2464,10 @@
"enhanced_ad_blocking": {
"message": "Versterkte Ad Blokkering"
},
- "smart_blocking": {
+ "smart_browsing": {
"message": "Slim Blokkeren"
},
- "smart_blocking_DESC": {
+ "smart_browsing_DESC": {
"message": "Blokkeer en deblokkeer trackers automatisch om pagina-performance te optimaliseren."
},
"ad_blocking_DESC": {
diff --git a/_locales/pl/messages.json b/_locales/pl/messages.json
index d603cb745..641723307 100644
--- a/_locales/pl/messages.json
+++ b/_locales/pl/messages.json
@@ -674,7 +674,7 @@
"panel_tracker_warning_slow_tooltip": {
"message": "Tropiciel spowalnia działanie"
},
- "panel_tracker_warning_smartblock_tooltip": {
+ "panel_tracker_warning_smartbrowse_tooltip": {
"message": "Tropiciel zablokowany przez Blokowanie inteligentne"
},
"panel_tracker_warning_smartunblock_tooltip": {
@@ -1145,10 +1145,10 @@
"alert_ad_block_off": {
"message": "Wzmocnione blokowanie reklam WYŁĄCZONE. Reklamy nie będą blokowane."
},
- "alert_smart_block_on": {
+ "alert_smart_browse_on": {
"message": "Blokowanie inteligentne WŁĄCZONE. Blokowanie tropicieli będzie dostosowywane w celu zoptymalizowania wydajności strony."
},
- "alert_smart_block_off": {
+ "alert_smart_browse_off": {
"message": "Blokowanie inteligentne WYŁĄCZONE. Blokowanie tropicieli nie będzie dostosowywane automatycznie."
},
"alert_reload": {
@@ -1175,7 +1175,7 @@
"tooltip_ad_block_on": {
"message": "Zablokowano reklamy."
},
- "tooltip_smart_block_on": {
+ "tooltip_smart_browse_on": {
"message": "Blokowanie tropicieli dostosowane w celu zoptymalizowania wydajności strony."
},
"tooltip_trust": {
@@ -2464,10 +2464,10 @@
"enhanced_ad_blocking": {
"message": "Wzmocnione blokowanie reklam"
},
- "smart_blocking": {
+ "smart_browsing": {
"message": "Blokowanie inteligentne"
},
- "smart_blocking_DESC": {
+ "smart_browsing_DESC": {
"message": "Automatycznie blokuj i odblokowuj tropiciele w celu zoptymalizowania wydajności strony."
},
"ad_blocking_DESC": {
diff --git a/_locales/pt_BR/messages.json b/_locales/pt_BR/messages.json
index a0d5e5378..64be4c914 100644
--- a/_locales/pt_BR/messages.json
+++ b/_locales/pt_BR/messages.json
@@ -674,7 +674,7 @@
"panel_tracker_warning_slow_tooltip": {
"message": "O rastreador é lento"
},
- "panel_tracker_warning_smartblock_tooltip": {
+ "panel_tracker_warning_smartbrowse_tooltip": {
"message": "Rastreador bloqueado pelo Bloqueio Inteligente"
},
"panel_tracker_warning_smartunblock_tooltip": {
@@ -1145,10 +1145,10 @@
"alert_ad_block_off": {
"message": "O bloqueio de anúncios aprimorado está DESATIVADO Os anúncios não serão bloqueados."
},
- "alert_smart_block_on": {
+ "alert_smart_browse_on": {
"message": "Bloqueio inteligente ATIVADO. O bloqueio inteligente será ajustado para otimizar o desempenho da página."
},
- "alert_smart_block_off": {
+ "alert_smart_browse_off": {
"message": "Bloqueio inteligente DESATIVADO. O bloqueador de rastreadores não será automaticamente ajustado."
},
"alert_reload": {
@@ -1175,7 +1175,7 @@
"tooltip_ad_block_on": {
"message": "Os anúncios não foram bloqueados."
},
- "tooltip_smart_block_on": {
+ "tooltip_smart_browse_on": {
"message": "O bloqueio inteligente ajustado para otimizar o desempenho da página."
},
"tooltip_trust": {
@@ -2464,10 +2464,10 @@
"enhanced_ad_blocking": {
"message": "Bloqueio de anúncios aprimorado"
},
- "smart_blocking": {
+ "smart_browsing": {
"message": "Bloqueio inteligente"
},
- "smart_blocking_DESC": {
+ "smart_browsing_DESC": {
"message": "Bloquear e desbloquear automaticamente os rastreadores para otimizar o desempenho da página"
},
"ad_blocking_DESC": {
diff --git a/_locales/ru/messages.json b/_locales/ru/messages.json
index f806d94b7..bc14b1a26 100644
--- a/_locales/ru/messages.json
+++ b/_locales/ru/messages.json
@@ -674,7 +674,7 @@
"panel_tracker_warning_slow_tooltip": {
"message": "Трекер медленный"
},
- "panel_tracker_warning_smartblock_tooltip": {
+ "panel_tracker_warning_smartbrowse_tooltip": {
"message": "Трекер заблокирован Smart Blocking"
},
"panel_tracker_warning_smartunblock_tooltip": {
@@ -1145,10 +1145,10 @@
"alert_ad_block_off": {
"message": "Усовершенствованная блокировка рекламы отключена. Реклама не будет заблокирована."
},
- "alert_smart_block_on": {
+ "alert_smart_browse_on": {
"message": "Умная блокировка включена. Блокировка трекеров будет откорректирована для оптимизации работы страницы."
},
- "alert_smart_block_off": {
+ "alert_smart_browse_off": {
"message": "Умная блокировка отключена. Блокировка трекеров не будет автоматически корректироваться."
},
"alert_reload": {
@@ -1175,7 +1175,7 @@
"tooltip_ad_block_on": {
"message": "Реклама заблокирована."
},
- "tooltip_smart_block_on": {
+ "tooltip_smart_browse_on": {
"message": "Блокировка трекеров откорректирована для оптимизации работы страницы."
},
"tooltip_trust": {
@@ -2464,10 +2464,10 @@
"enhanced_ad_blocking": {
"message": "Рекламоблокер++"
},
- "smart_blocking": {
+ "smart_browsing": {
"message": "Умная блокировка"
},
- "smart_blocking_DESC": {
+ "smart_browsing_DESC": {
"message": "Автоматически блокирует и разблокирует трекеры для оптимизации работы страницы."
},
"ad_blocking_DESC": {
diff --git a/_locales/zh_CN/messages.json b/_locales/zh_CN/messages.json
index c9e4b037c..51a163961 100644
--- a/_locales/zh_CN/messages.json
+++ b/_locales/zh_CN/messages.json
@@ -674,7 +674,7 @@
"panel_tracker_warning_slow_tooltip": {
"message": "跟踪器降低网页加载速度"
},
- "panel_tracker_warning_smartblock_tooltip": {
+ "panel_tracker_warning_smartbrowse_tooltip": {
"message": "智能拦截功能拦截的跟踪器"
},
"panel_tracker_warning_smartunblock_tooltip": {
@@ -1145,10 +1145,10 @@
"alert_ad_block_off": {
"message": "增强版广告拦截功能已关闭。广告不会被拦截。"
},
- "alert_smart_block_on": {
+ "alert_smart_browse_on": {
"message": "智能拦截功能已开启。将调整跟踪器拦截功能以优化页面性能。"
},
- "alert_smart_block_off": {
+ "alert_smart_browse_off": {
"message": "智能拦截功能已关闭。跟踪器拦截功能将不会自动调整。"
},
"alert_reload": {
@@ -1175,7 +1175,7 @@
"tooltip_ad_block_on": {
"message": "广告已被拦截。"
},
- "tooltip_smart_block_on": {
+ "tooltip_smart_browse_on": {
"message": "已调整跟踪器拦截功能以优化页面性能。"
},
"tooltip_trust": {
@@ -2464,10 +2464,10 @@
"enhanced_ad_blocking": {
"message": "增强型广告屏蔽"
},
- "smart_blocking": {
+ "smart_browsing": {
"message": "智能拦截"
},
- "smart_blocking_DESC": {
+ "smart_browsing_DESC": {
"message": "自动拦截和取消拦截跟踪器,优化网页性能。"
},
"ad_blocking_DESC": {
diff --git a/_locales/zh_TW/messages.json b/_locales/zh_TW/messages.json
index 4a5c84891..a3a3fdb93 100644
--- a/_locales/zh_TW/messages.json
+++ b/_locales/zh_TW/messages.json
@@ -674,7 +674,7 @@
"panel_tracker_warning_slow_tooltip": {
"message": "網頁跟縱器工作緩慢"
},
- "panel_tracker_warning_smartblock_tooltip": {
+ "panel_tracker_warning_smartbrowse_tooltip": {
"message": "追蹤器已被智能攔截功能攔截"
},
"panel_tracker_warning_smartunblock_tooltip": {
@@ -1145,10 +1145,10 @@
"alert_ad_block_off": {
"message": "強化了的廣告封鎖功能已停用廣告將不會被封鎖。"
},
- "alert_smart_block_on": {
+ "alert_smart_browse_on": {
"message": "智能封鎖已啟動。\n跟蹤器封鎖功能將被調整以優化網頁效能。"
},
- "alert_smart_block_off": {
+ "alert_smart_browse_off": {
"message": "智能封鎖已關閉。跟蹤器封鎖功能不會自動調整。"
},
"alert_reload": {
@@ -1175,7 +1175,7 @@
"tooltip_ad_block_on": {
"message": "廣告已被封鎖。"
},
- "tooltip_smart_block_on": {
+ "tooltip_smart_browse_on": {
"message": "跟蹤器封鎖功能被調整以優化網頁效能。"
},
"tooltip_trust": {
@@ -2464,10 +2464,10 @@
"enhanced_ad_blocking": {
"message": "強反了的廣告封鎖"
},
- "smart_blocking": {
+ "smart_browsing": {
"message": "智能阻止"
},
- "smart_blocking_DESC": {
+ "smart_browsing_DESC": {
"message": "自動封鎖及解封網頁跟蹤器以優化網頁的效率。"
},
"ad_blocking_DESC": {
diff --git a/app/hub/Views/SetupView/SetupViewConstants.js b/app/hub/Views/SetupView/SetupViewConstants.js
index 73744d686..e86b5308e 100644
--- a/app/hub/Views/SetupView/SetupViewConstants.js
+++ b/app/hub/Views/SetupView/SetupViewConstants.js
@@ -28,7 +28,7 @@ export const BLOCKING_POLICY_CUSTOM = 'BLOCKING_POLICY_CUSTOM';
// Setup Anti-Suite
export const SET_ANTI_TRACKING = 'SET_ANTI_TRACKING';
export const SET_AD_BLOCK = 'SET_AD_BLOCK';
-export const SET_SMART_BLOCK = 'SET_SMART_BLOCK';
+export const SET_SMART_BROWSE = 'SET_SMART_BROWSE';
export const SET_GHOSTERY_REWARDS = 'SET_GHOSTERY_REWARDS';
// Setup Human Web
diff --git a/app/hub/Views/SetupView/SetupViewContainer.jsx b/app/hub/Views/SetupView/SetupViewContainer.jsx
index 6d4eb087c..97e0f5b0f 100644
--- a/app/hub/Views/SetupView/SetupViewContainer.jsx
+++ b/app/hub/Views/SetupView/SetupViewContainer.jsx
@@ -109,7 +109,7 @@ class SetupViewContainer extends Component {
actions.setBlockingPolicy({ blockingPolicy: BLOCKING_POLICY_RECOMMENDED });
actions.setAntiTracking({ enable_anti_tracking: true });
actions.setAdBlock({ enable_ad_block: true });
- actions.setSmartBlocking({ enable_smart_block: true });
+ actions.setSmartBrowsing({ enable_smart_browse: true });
actions.setGhosteryRewards({ enable_ghostery_rewards: !IS_FIREFOX && !IS_ANDROID && BROWSER_INFO.name !== 'ghostery_desktop' });
actions.setHumanWeb({ enable_human_web: !IS_FIREFOX || BROWSER_INFO.name === 'ghostery_desktop' || BROWSER_INFO.name === 'ghostery_android' });
}
@@ -248,7 +248,7 @@ SetupViewContainer.propTypes = {
blockingPolicy: PropTypes.string,
enable_anti_tracking: PropTypes.bool,
enable_ad_block: PropTypes.bool,
- enable_smart_block: PropTypes.bool,
+ enable_smart_browse: PropTypes.bool,
enable_ghostery_rewards: PropTypes.bool,
enable_human_web: PropTypes.bool,
}),
@@ -261,7 +261,7 @@ SetupViewContainer.propTypes = {
setBlockingPolicy: PropTypes.func.isRequired,
setAntiTracking: PropTypes.func.isRequired,
setAdBlock: PropTypes.func.isRequired,
- setSmartBlocking: PropTypes.func.isRequired,
+ setSmartBrowsing: PropTypes.func.isRequired,
setGhosteryRewards: PropTypes.func.isRequired,
setHumanWeb: PropTypes.func.isRequired,
setSetupComplete: PropTypes.func.isRequired,
@@ -285,7 +285,7 @@ SetupViewContainer.defaultProps = {
blockingPolicy: BLOCKING_POLICY_RECOMMENDED,
enable_anti_tracking: true,
enable_ad_block: true,
- enable_smart_block: true,
+ enable_smart_browse: true,
enable_ghostery_rewards: true,
enable_human_web: true,
},
diff --git a/app/hub/Views/SetupView/SetupViewReducer.js b/app/hub/Views/SetupView/SetupViewReducer.js
index 46c5c51a1..882fe8fd2 100644
--- a/app/hub/Views/SetupView/SetupViewReducer.js
+++ b/app/hub/Views/SetupView/SetupViewReducer.js
@@ -19,7 +19,7 @@ import {
SET_BLOCKING_POLICY,
SET_ANTI_TRACKING,
SET_AD_BLOCK,
- SET_SMART_BLOCK,
+ SET_SMART_BROWSE,
SET_GHOSTERY_REWARDS,
SET_HUMAN_WEB
} from './SetupViewConstants';
@@ -41,7 +41,7 @@ function SetupViewReducer(state = initialState, action) {
blockingPolicy,
enable_anti_tracking,
enable_ad_block,
- enable_smart_block,
+ enable_smart_browse,
enable_ghostery_rewards,
enable_human_web,
} = action.data;
@@ -70,7 +70,7 @@ function SetupViewReducer(state = initialState, action) {
blockingPolicy,
enable_anti_tracking,
enable_ad_block,
- enable_smart_block,
+ enable_smart_browse,
enable_ghostery_rewards,
enable_human_web,
}
@@ -118,9 +118,9 @@ function SetupViewReducer(state = initialState, action) {
const { enable_ad_block } = action.data;
return { ...state, setup: { ...state.setup, enable_ad_block } };
}
- case SET_SMART_BLOCK: {
- const { enable_smart_block } = action.data;
- return { ...state, setup: { ...state.setup, enable_smart_block } };
+ case SET_SMART_BROWSE: {
+ const { enable_smart_browse } = action.data;
+ return { ...state, setup: { ...state.setup, enable_smart_browse } };
}
case SET_GHOSTERY_REWARDS: {
const { enable_ghostery_rewards } = action.data;
diff --git a/app/hub/Views/SetupView/__tests__/SetupViewContainer.test.jsx b/app/hub/Views/SetupView/__tests__/SetupViewContainer.test.jsx
index 163b4ec80..b5865223e 100644
--- a/app/hub/Views/SetupView/__tests__/SetupViewContainer.test.jsx
+++ b/app/hub/Views/SetupView/__tests__/SetupViewContainer.test.jsx
@@ -44,7 +44,7 @@ const actions = {
setBlockingPolicy: () => {},
setAntiTracking: () => {},
setAdBlock: () => {},
- setSmartBlocking: () => {},
+ setSmartBrowsing: () => {},
setGhosteryRewards: () => {},
setHumanWeb: () => {},
setSetupComplete: () => {},
diff --git a/app/hub/Views/SetupView/__tests__/SetupViewReducer.test.js b/app/hub/Views/SetupView/__tests__/SetupViewReducer.test.js
index 865ec3a7b..9fbfd962e 100644
--- a/app/hub/Views/SetupView/__tests__/SetupViewReducer.test.js
+++ b/app/hub/Views/SetupView/__tests__/SetupViewReducer.test.js
@@ -23,7 +23,7 @@ import {
BLOCKING_POLICY_NOTHING,
SET_ANTI_TRACKING,
SET_AD_BLOCK,
- SET_SMART_BLOCK,
+ SET_SMART_BROWSE,
SET_GHOSTERY_REWARDS,
SET_HUMAN_WEB
} from '../SetupViewConstants';
@@ -44,7 +44,7 @@ const initialState = Immutable({
blockingPolicy: BLOCKING_POLICY_RECOMMENDED,
enable_anti_tracking: true,
enable_ad_block: true,
- enable_smart_block: true,
+ enable_smart_browse: true,
enable_ghostery_rewards: true,
enable_human_web: true,
},
@@ -149,17 +149,17 @@ describe('app/hub/Views/SetupView reducer', () => {
});
});
- test('reducer correctly handles SET_SMART_BLOCK', () => {
+ test('reducer correctly handles SET_SMART_BROWSE', () => {
const data = {
test: 'test-bad-data',
- enable_smart_block: false,
+ enable_smart_browse: false,
};
- const action = { data, type: SET_SMART_BLOCK };
+ const action = { data, type: SET_SMART_BROWSE };
const initState = Immutable({
setup: {
test: 'test-good-data',
example: 'example-good-data',
- enable_smart_block: 'ESB-bad-data',
+ enable_smart_browse: 'ESB-bad-data',
}
});
@@ -167,7 +167,7 @@ describe('app/hub/Views/SetupView reducer', () => {
setup: {
test: 'test-good-data',
example: 'example-good-data',
- enable_smart_block: data.enable_smart_block,
+ enable_smart_browse: data.enable_smart_browse,
}
});
});
@@ -176,7 +176,7 @@ describe('app/hub/Views/SetupView reducer', () => {
const data = {
test: 'test-bad-data',
enable_ad_block: true, // Bad Data
- enable_smart_block: false, // Bad Data
+ enable_smart_browse: false, // Bad Data
enable_ghostery_rewards: false,
};
const action = { data, type: SET_GHOSTERY_REWARDS };
diff --git a/app/hub/Views/SetupView/index.js b/app/hub/Views/SetupView/index.js
index 5bd10681d..59c556e8c 100644
--- a/app/hub/Views/SetupView/index.js
+++ b/app/hub/Views/SetupView/index.js
@@ -22,7 +22,7 @@ import setBlockingPolicy from '../SetupViews/SetupBlockingView/SetupBlockingView
import {
setAntiTracking,
setAdBlock,
- setSmartBlocking,
+ setSmartBrowsing,
setGhosteryRewards
} from '../SetupViews/SetupAntiSuiteView/SetupAntiSuiteViewActions';
import setHumanWeb from '../SetupViews/SetupHumanWebView/SetupHumanWebViewActions';
@@ -48,7 +48,7 @@ const mapDispatchToProps = dispatch => ({
setBlockingPolicy,
setAntiTracking,
setAdBlock,
- setSmartBlocking,
+ setSmartBrowsing,
setGhosteryRewards,
setHumanWeb,
setSetupComplete
diff --git a/app/hub/Views/SetupViews/SetupAntiSuiteView/SetupAntiSuiteView.scss b/app/hub/Views/SetupViews/SetupAntiSuiteView/SetupAntiSuiteView.scss
index eba6b5f6b..69a145777 100644
--- a/app/hub/Views/SetupViews/SetupAntiSuiteView/SetupAntiSuiteView.scss
+++ b/app/hub/Views/SetupViews/SetupAntiSuiteView/SetupAntiSuiteView.scss
@@ -63,12 +63,12 @@
background-image: buildAdBlockActiveIcon(#1dafed);
}
-// Smart Blocking Icon
-.SetupAntiSuite__feature .smart-blocking {
- background-image: buildSmartBlockingIcon(#9f9f9f);
+// Smart-Browsing Icon
+.SetupAntiSuite__feature .smart-browsing {
+ background-image: buildSmartBrowsingIcon(#9f9f9f);
}
-.SetupAntiSuite__feature .smart-blocking.active {
- background-image: buildSmartBlockingActiveIcon(#1dafed);
+.SetupAntiSuite__feature .smart-browsing.active {
+ background-image: buildSmartBrowsingActiveIcon(#1dafed);
}
// Ghostery Rewards Icon
diff --git a/app/hub/Views/SetupViews/SetupAntiSuiteView/SetupAntiSuiteViewActions.js b/app/hub/Views/SetupViews/SetupAntiSuiteView/SetupAntiSuiteViewActions.js
index f26319b72..53b880d5c 100644
--- a/app/hub/Views/SetupViews/SetupAntiSuiteView/SetupAntiSuiteViewActions.js
+++ b/app/hub/Views/SetupViews/SetupAntiSuiteView/SetupAntiSuiteViewActions.js
@@ -15,7 +15,7 @@ import { log, sendMessageInPromise } from '../../../utils';
import {
SET_ANTI_TRACKING,
SET_AD_BLOCK,
- SET_SMART_BLOCK,
+ SET_SMART_BROWSE,
SET_GHOSTERY_REWARDS
} from '../../SetupView/SetupViewConstants';
@@ -45,15 +45,15 @@ export function setAdBlock(actionData) {
};
}
-export function setSmartBlocking(actionData) {
+export function setSmartBrowsing(actionData) {
return function(dispatch) {
- return sendMessageInPromise(SET_SMART_BLOCK, actionData).then((data) => {
+ return sendMessageInPromise(SET_SMART_BROWSE, actionData).then((data) => {
dispatch({
- type: SET_SMART_BLOCK,
+ type: SET_SMART_BROWSE,
data,
});
}).catch((err) => {
- log('setupBlocking Action setSmartBlocking Error', err);
+ log('setupBlocking Action setSmartBrowsing Error', err);
});
};
}
diff --git a/app/hub/Views/SetupViews/SetupAntiSuiteView/SetupAntiSuiteViewContainer.jsx b/app/hub/Views/SetupViews/SetupAntiSuiteView/SetupAntiSuiteViewContainer.jsx
index bc473de16..fb9c8605d 100644
--- a/app/hub/Views/SetupViews/SetupAntiSuiteView/SetupAntiSuiteViewContainer.jsx
+++ b/app/hub/Views/SetupViews/SetupAntiSuiteView/SetupAntiSuiteViewContainer.jsx
@@ -47,13 +47,13 @@ class SetupAntiSuiteViewContainer extends Component {
const {
enable_anti_tracking,
enable_ad_block,
- enable_smart_block,
+ enable_smart_browse,
enable_ghostery_rewards
} = setup;
props.actions.setSetupStep({ setup_step: 9 });
props.actions.setAntiTracking({ enable_anti_tracking });
props.actions.setAdBlock({ enable_ad_block });
- props.actions.setSmartBlocking({ enable_smart_block });
+ props.actions.setSmartBrowsing({ enable_smart_browse });
props.actions.setGhosteryRewards({ enable_ghostery_rewards });
}
}
@@ -75,9 +75,9 @@ class SetupAntiSuiteViewContainer extends Component {
actions.setAdBlock({ enable_ad_block });
break;
}
- case 'smart-blocking': {
- const enable_smart_block = !setup.enable_smart_block;
- actions.setSmartBlocking({ enable_smart_block });
+ case 'smart-browsing': {
+ const enable_smart_browse = !setup.enable_smart_browse;
+ actions.setSmartBrowsing({ enable_smart_browse });
break;
}
case 'ghostery-rewards': {
@@ -98,7 +98,7 @@ class SetupAntiSuiteViewContainer extends Component {
const {
enable_anti_tracking,
enable_ad_block,
- enable_smart_block,
+ enable_smart_browse,
enable_ghostery_rewards,
} = setup;
@@ -107,7 +107,7 @@ class SetupAntiSuiteViewContainer extends Component {
const features = [
{
id: 'anti-tracking',
- name: t('enhanced_anti_tracking'),
+ name: t('anti_tracking'),
enabled: anti_tracking_enabled,
locked: IS_CLIQZ,
toggle: IS_CLIQZ ?
@@ -117,7 +117,7 @@ class SetupAntiSuiteViewContainer extends Component {
},
{
id: 'ad-block',
- name: t('enhanced_ad_blocking'),
+ name: t('ad_blocking'),
enabled: ad_block_enabled,
locked: IS_CLIQZ,
toggle: IS_CLIQZ ?
@@ -126,11 +126,11 @@ class SetupAntiSuiteViewContainer extends Component {
description: IS_CLIQZ ? t('hub_setup_feature_already_active') : t('ad_blocking_DESC'),
},
{
- id: 'smart-blocking',
- name: t('smart_blocking'),
- enabled: enable_smart_block,
- toggle: () => this._handleToggle('smart-blocking'),
- description: t('smart_blocking_DESC'),
+ id: 'smart-browsing',
+ name: t('smart_browsing'),
+ enabled: enable_smart_browse,
+ toggle: () => this._handleToggle('smart-browsing'),
+ description: t('smart_browsing_DESC'),
}
];
@@ -156,7 +156,7 @@ SetupAntiSuiteViewContainer.propTypes = {
setSetupNavigation: PropTypes.func.isRequired,
setAntiTracking: PropTypes.func.isRequired,
setAdBlock: PropTypes.func.isRequired,
- setSmartBlocking: PropTypes.func.isRequired,
+ setSmartBrowsing: PropTypes.func.isRequired,
setGhosteryRewards: PropTypes.func.isRequired
}).isRequired,
sendMountActions: PropTypes.bool.isRequired,
diff --git a/app/hub/Views/SetupViews/SetupAntiSuiteView/__tests__/SetupAntiSuiteViewActions.test.js b/app/hub/Views/SetupViews/SetupAntiSuiteView/__tests__/SetupAntiSuiteViewActions.test.js
index 2fe71a39d..2de088c03 100644
--- a/app/hub/Views/SetupViews/SetupAntiSuiteView/__tests__/SetupAntiSuiteViewActions.test.js
+++ b/app/hub/Views/SetupViews/SetupAntiSuiteView/__tests__/SetupAntiSuiteViewActions.test.js
@@ -18,7 +18,7 @@ import * as SetupAntiSuiteViewActions from '../SetupAntiSuiteViewActions';
import {
SET_ANTI_TRACKING,
SET_AD_BLOCK,
- SET_SMART_BLOCK,
+ SET_SMART_BROWSE,
SET_GHOSTERY_REWARDS
} from '../../../SetupView/SetupViewConstants';
@@ -36,7 +36,7 @@ utils.sendMessageInPromise = jest.fn((name, message) => new Promise((resolve, re
resolve(message);
break;
}
- case SET_SMART_BLOCK: {
+ case SET_SMART_BROWSE: {
resolve(message);
break;
}
@@ -75,14 +75,14 @@ describe('app/hub/Views/SetupViews/SetupAntiSuiteView actions', () => {
});
});
- test('setSmartBlocking action should return correctly', () => {
+ test('setSmartBrowsing action should return correctly', () => {
const initialState = {};
const store = mockStore(initialState);
const data = testData;
- const expectedPayload = { data, type: SET_SMART_BLOCK };
+ const expectedPayload = { data, type: SET_SMART_BROWSE };
- return store.dispatch(SetupAntiSuiteViewActions.setSmartBlocking(data)).then(() => {
+ return store.dispatch(SetupAntiSuiteViewActions.setSmartBrowsing(data)).then(() => {
const actions = store.getActions();
expect(actions).toEqual([expectedPayload]);
});
diff --git a/app/hub/Views/TutorialView/TutorialView.scss b/app/hub/Views/TutorialView/TutorialView.scss
index eebb3226e..428f3b21d 100644
--- a/app/hub/Views/TutorialView/TutorialView.scss
+++ b/app/hub/Views/TutorialView/TutorialView.scss
@@ -249,8 +249,8 @@
background-image: buildAdBlockIcon(#1dafed);
background-position: left 11.5px top 4px;
}
-.TutorialAntiSuiteView__key .TutorialView__keyImage.smart-block {
- background-image: buildSmartBlockingIcon(#1dafed);
+.TutorialAntiSuiteView__key .TutorialView__keyImage.smart-browse {
+ background-image: buildSmartBrowsingIcon(#1dafed);
background-position: left 13.5px top 2px;
}
.TutorialAntiSuiteView__key .TutorialView__keyTitle {
diff --git a/app/hub/Views/TutorialViews/TutorialAntiSuiteView/TutorialAntiSuiteView.jsx b/app/hub/Views/TutorialViews/TutorialAntiSuiteView/TutorialAntiSuiteView.jsx
index 886994943..b7657bc3c 100644
--- a/app/hub/Views/TutorialViews/TutorialAntiSuiteView/TutorialAntiSuiteView.jsx
+++ b/app/hub/Views/TutorialViews/TutorialAntiSuiteView/TutorialAntiSuiteView.jsx
@@ -53,7 +53,7 @@ const TutorialAntiSuiteView = ({ isAndroid }) => (
- {t('enhanced_anti_tracking')}
+ {t('anti_tracking')}
{t('hub_tutorial_antisuite_antitracking_description')}
@@ -64,7 +64,7 @@ const TutorialAntiSuiteView = ({ isAndroid }) => (
- {t('enhanced_ad_blocking')}
+ {t('ad_blocking')}
{t('ad_blocking_DESC')}
@@ -72,13 +72,13 @@ const TutorialAntiSuiteView = ({ isAndroid }) => (
-
+
- {t('smart_blocking')}
+ {t('smart_browsing')}
- {t('smart_blocking_DESC')}
+ {t('smart_browsing_DESC')}
diff --git a/app/hub/Views/TutorialViews/TutorialAntiSuiteView/__test__/__snapshots__/TutorialAntiSuiteView.test.jsx.snap b/app/hub/Views/TutorialViews/TutorialAntiSuiteView/__test__/__snapshots__/TutorialAntiSuiteView.test.jsx.snap
index bed91e7ce..e9acc6d0a 100644
--- a/app/hub/Views/TutorialViews/TutorialAntiSuiteView/__test__/__snapshots__/TutorialAntiSuiteView.test.jsx.snap
+++ b/app/hub/Views/TutorialViews/TutorialAntiSuiteView/__test__/__snapshots__/TutorialAntiSuiteView.test.jsx.snap
@@ -51,7 +51,7 @@ exports[`app/hub/Views/TutorialViews/TutorialAntiSuiteView component Snapshot te
- enhanced_anti_tracking
+ anti_tracking
- enhanced_ad_blocking
+ ad_blocking
- smart_blocking
+ smart_browsing
- smart_blocking_DESC
+ smart_browsing_DESC
diff --git a/app/panel-android/actions/blockingActions.js b/app/panel-android/actions/blockingActions.js
index d8c248a3c..ac37b23d9 100644
--- a/app/panel-android/actions/blockingActions.js
+++ b/app/panel-android/actions/blockingActions.js
@@ -421,7 +421,7 @@ export function resetSettings({ state }) {
paused_blocking: false,
enable_anti_tracking: true,
enable_ad_block: true,
- enable_smart_block: true,
+ enable_smart_browse: true,
});
return {
@@ -439,7 +439,7 @@ export function resetSettings({ state }) {
panel: {
enable_anti_tracking: true,
enable_ad_block: true,
- enable_smart_block: true,
+ enable_smart_browse: true,
},
};
}
diff --git a/app/panel-android/components/PanelAndroid.jsx b/app/panel-android/components/PanelAndroid.jsx
index 43eb6eacd..12a638cb7 100644
--- a/app/panel-android/components/PanelAndroid.jsx
+++ b/app/panel-android/components/PanelAndroid.jsx
@@ -35,8 +35,8 @@ class PanelAndroid extends React.Component {
panel: {
enable_ad_block: false,
enable_anti_tracking: false,
- enable_smart_block: false,
- smartBlock: { blocked: {}, unblocked: {} },
+ enable_smart_browse: false,
+ smartBrowse: { blocked: {}, unblocked: {} },
},
summary: {
categories: [],
diff --git a/app/panel-android/components/content/BlockingTracker.jsx b/app/panel-android/components/content/BlockingTracker.jsx
index 584551e05..8f8e86341 100644
--- a/app/panel-android/components/content/BlockingTracker.jsx
+++ b/app/panel-android/components/content/BlockingTracker.jsx
@@ -25,11 +25,11 @@ class BlockingTracker extends React.Component {
catId = '',
ss_allowed = false,
ss_blocked = false,
- warningSmartBlock = false,
+ warningSmartBrowse = false,
} = tracker;
if (type === 'site') {
- if (warningSmartBlock) {
+ if (warningSmartBrowse) {
return 'override-sb';
}
@@ -214,7 +214,7 @@ class BlockingTracker extends React.Component {
renderTrackerStatus() {
const trackerSelect = this.trackerSelectStatus;
const trackerSelectClassNames = ClassNames({
- OverrideSmartBlock: trackerSelect === 'override-sb',
+ OverrideSmartBrowse: trackerSelect === 'override-sb',
BlockingSelectButton: trackerSelect.indexOf('override-') === -1,
BlockingSelectButton__blocked: trackerSelect === 'blocked',
BlockingSelectButton__trusted: trackerSelect === 'trusted',
@@ -277,15 +277,15 @@ class BlockingTracker extends React.Component {
);
}
- renderSmartBlockOverflow() {
+ renderSmartBrowseOverflow() {
const { open, tracker } = this.props;
- const { warningSmartBlock } = tracker;
+ const { warningSmartBrowse } = tracker;
const selectGroupClassNames = ClassNames('OverrideText full-height',
'flex-container align-center-middle', {
'OverrideText--open': open,
});
- const text = (warningSmartBlock && warningSmartBlock === 'blocked') ?
- t('panel_tracker_warning_smartblock_tooltip') :
+ const text = (warningSmartBrowse && warningSmartBrowse === 'blocked') ?
+ t('panel_tracker_warning_smartbrowse_tooltip') :
t('panel_tracker_warning_smartunblock_tooltip');
return (
@@ -363,7 +363,7 @@ class BlockingTracker extends React.Component {
return this.renderUnidentifiedOverflow();
}
if (trackerSelect === 'override-sb') {
- return this.renderSmartBlockOverflow();
+ return this.renderSmartBrowseOverflow();
}
return this.renderBlockingOverflow();
diff --git a/app/panel-android/components/content/OverviewTab.jsx b/app/panel-android/components/content/OverviewTab.jsx
index 579d7e78d..ed07fe672 100644
--- a/app/panel-android/components/content/OverviewTab.jsx
+++ b/app/panel-android/components/content/OverviewTab.jsx
@@ -74,12 +74,12 @@ class OverviewTab extends React.Component {
return (trackerCounts && (trackerCounts.allowed + trackerCounts.blocked)) || 0;
}
- get smartBlockBlocked() {
+ get smartBrowseBlocked() {
const { panel, summary } = this.props;
- const { smartBlock } = panel;
+ const { smartBrowse } = panel;
const { trackerCounts } = summary;
- let sbBlocked = (smartBlock && smartBlock.blocked && Object.keys(smartBlock.blocked).length) || 0;
+ let sbBlocked = (smartBrowse && smartBrowse.blocked && Object.keys(smartBrowse.blocked).length) || 0;
if (sbBlocked === trackerCounts.sbBlocked) {
sbBlocked = 0;
}
@@ -87,12 +87,12 @@ class OverviewTab extends React.Component {
return sbBlocked;
}
- get smartBlockAllowed() {
+ get smartBrowseAllowed() {
const { panel, summary } = this.props;
- const { smartBlock } = panel;
+ const { smartBrowse } = panel;
const { trackerCounts } = summary;
- let sbAllowed = (smartBlock && smartBlock.unblocked && Object.keys(smartBlock.unblocked).length) || 0;
+ let sbAllowed = (smartBrowse && smartBrowse.unblocked && Object.keys(smartBrowse.unblocked).length) || 0;
if (sbAllowed === trackerCounts.sbAllowed) {
sbAllowed = 0;
}
@@ -100,11 +100,11 @@ class OverviewTab extends React.Component {
return sbAllowed;
}
- get smartBlockAdjust() {
+ get smartBrowseAdjust() {
const { panel } = this.props;
- const { enable_smart_block } = panel;
+ const { enable_smart_browse } = panel;
- return enable_smart_block && ((this.smartBlockBlocked - this.smartBlockAllowed) || 0);
+ return enable_smart_browse && ((this.smartBrowseBlocked - this.smartBrowseAllowed) || 0);
}
get trackersBlockedCount() {
@@ -117,7 +117,7 @@ class OverviewTab extends React.Component {
} else if (sitePolicy === BLACKLISTED) {
totalTrackersBlockedCount = trackerCounts.blocked + trackerCounts.allowed || 0;
} else {
- totalTrackersBlockedCount = trackerCounts.blocked + this.smartBlockAdjust || 0;
+ totalTrackersBlockedCount = trackerCounts.blocked + this.smartBrowseAdjust || 0;
}
return totalTrackersBlockedCount;
@@ -313,7 +313,7 @@ class OverviewTab extends React.Component {
_renderCliqzFeatures() {
const { panel, summary } = this.props;
- const { enable_anti_tracking, enable_ad_block, enable_smart_block } = panel;
+ const { enable_anti_tracking, enable_ad_block, enable_smart_browse } = panel;
const { paused_blocking, sitePolicy } = summary;
const disableBlocking = this.siteNotScanned;
@@ -340,8 +340,8 @@ class OverviewTab extends React.Component {
@@ -392,8 +392,8 @@ OverviewTab.propTypes = {
panel: PropTypes.shape({
enable_ad_block: PropTypes.bool.isRequired,
enable_anti_tracking: PropTypes.bool.isRequired,
- enable_smart_block: PropTypes.bool.isRequired,
- smartBlock: PropTypes.shape({
+ enable_smart_browse: PropTypes.bool.isRequired,
+ smartBrowse: PropTypes.shape({
blocked: PropTypes.shape({}).isRequired,
unblocked: PropTypes.shape({}).isRequired,
}).isRequired,
diff --git a/app/panel-android/components/content/__tests__/OverviewTab.jsx b/app/panel-android/components/content/__tests__/OverviewTab.jsx
index 4fec3f938..17f7661e1 100644
--- a/app/panel-android/components/content/__tests__/OverviewTab.jsx
+++ b/app/panel-android/components/content/__tests__/OverviewTab.jsx
@@ -24,8 +24,8 @@ describe('app/panel-android/components/content/OverviewTab.jsx', () => {
const panel = {
enable_ad_block: false,
enable_anti_tracking: false,
- enable_smart_block: false,
- smartBlock: { blocked: {}, unblocked: {} },
+ enable_smart_browse: false,
+ smartBrowse: { blocked: {}, unblocked: {} },
};
const summary = {
categories: [],
@@ -63,8 +63,8 @@ describe('app/panel-android/components/content/OverviewTab.jsx', () => {
const panel = {
enable_ad_block: true,
enable_anti_tracking: true,
- enable_smart_block: true,
- smartBlock: { blocked: { 1: true }, unblocked: { 2: true, 3: true } },
+ enable_smart_browse: true,
+ smartBrowse: { blocked: { 1: true }, unblocked: { 2: true, 3: true } },
};
const summary = {
categories: ['ads', 'trackers'],
@@ -104,8 +104,8 @@ describe('app/panel-android/components/content/OverviewTab.jsx', () => {
const panel = {
enable_ad_block: false,
enable_anti_tracking: false,
- enable_smart_block: false,
- smartBlock: { blocked: {}, unblocked: {} },
+ enable_smart_browse: false,
+ smartBrowse: { blocked: {}, unblocked: {} },
};
const summary = {
categories: [],
diff --git a/app/panel-android/components/content/__tests__/__snapshots__/OverviewTab.jsx.snap b/app/panel-android/components/content/__tests__/__snapshots__/OverviewTab.jsx.snap
index d345de9e4..fe71a256d 100644
--- a/app/panel-android/components/content/__tests__/__snapshots__/OverviewTab.jsx.snap
+++ b/app/panel-android/components/content/__tests__/__snapshots__/OverviewTab.jsx.snap
@@ -180,7 +180,7 @@ exports[`app/panel-android/components/content/OverviewTab.jsx Snapshot tests wit
- enhanced_anti_tracking
+ anti_tracking
@@ -202,7 +202,7 @@ exports[`app/panel-android/components/content/OverviewTab.jsx Snapshot tests wit
- enhanced_ad_blocking
+ ad_blocking
@@ -219,12 +219,12 @@ exports[`app/panel-android/components/content/OverviewTab.jsx Snapshot tests wit
off
- smart_blocking
+ smart_browsing
@@ -455,7 +455,7 @@ exports[`app/panel-android/components/content/OverviewTab.jsx Snapshot tests wit
- enhanced_anti_tracking
+ anti_tracking
@@ -477,7 +477,7 @@ exports[`app/panel-android/components/content/OverviewTab.jsx Snapshot tests wit
- enhanced_ad_blocking
+ ad_blocking
@@ -494,12 +494,12 @@ exports[`app/panel-android/components/content/OverviewTab.jsx Snapshot tests wit
on
- smart_blocking
+ smart_browsing
diff --git a/app/panel/components/Blocking.jsx b/app/panel/components/Blocking.jsx
index 0a2dac64b..0c1401e49 100644
--- a/app/panel/components/Blocking.jsx
+++ b/app/panel/components/Blocking.jsx
@@ -92,7 +92,7 @@ class Blocking extends React.Component {
*/
componentDidUpdate(prevProps) {
const {
- actions, filter, categories, smartBlock, smartBlockActive
+ actions, filter, categories, smartBrowse, smartBrowseActive
} = this.props;
// methods here will run after categories is assigned
if (prevProps.filter.type !== filter.type
@@ -103,8 +103,8 @@ class Blocking extends React.Component {
// Update the summary blocking count whenever the blocking component updated.
// This will also show pending blocking changes if the panel is re-opened
// before a page refresh
- const computedSmartBlock = (smartBlockActive && smartBlock) || { blocked: {}, unblocked: {} };
- updateSummaryBlockingCount(categories, computedSmartBlock, actions.updateTrackerCounts);
+ const computedSmartBrowse = (smartBrowseActive && smartBrowse) || { blocked: {}, unblocked: {} };
+ updateSummaryBlockingCount(categories, computedSmartBrowse, actions.updateTrackerCounts);
}
/**
@@ -151,13 +151,13 @@ class Blocking extends React.Component {
* those that are blocked. Trigger action.
*/
setBlockedShow() {
- const { actions, categories, smartBlockActive } = this.props;
+ const { actions, categories, smartBrowseActive } = this.props;
const updated_categories = JSON.parse(JSON.stringify(categories)); // deep clone
updated_categories.forEach((categoryEl) => {
let count = 0;
categoryEl.trackers.forEach((trackerEl) => {
- const isSbBlocked = smartBlockActive && trackerEl.warningSmartBlock;
+ const isSbBlocked = smartBrowseActive && trackerEl.warningSmartBrowse;
if ((trackerEl.blocked && !trackerEl.ss_allowed) || isSbBlocked || trackerEl.ss_blocked) {
trackerEl.shouldShow = true;
count++;
@@ -325,8 +325,8 @@ class Blocking extends React.Component {
selected_app_ids,
show_tracker_urls,
sitePolicy,
- smartBlock,
- smartBlockActive,
+ smartBrowse,
+ smartBrowseActive,
} = this.props;
const {
@@ -342,8 +342,8 @@ class Blocking extends React.Component {
sitePolicy={sitePolicy}
paused_blocking={paused_blocking}
selected_app_ids={selected_app_ids}
- smartBlockActive={smartBlockActive}
- smartBlock={smartBlock}
+ smartBrowseActive={smartBrowseActive}
+ smartBrowse={smartBrowse}
/>
{(disableBlocking && is_expanded) ? (
@@ -358,8 +358,8 @@ class Blocking extends React.Component {
sitePolicy={sitePolicy}
paused_blocking={paused_blocking}
language={language}
- smartBlockActive={smartBlockActive}
- smartBlock={smartBlock}
+ smartBrowseActive={smartBrowseActive}
+ smartBrowse={smartBrowse}
unidentifiedCategory={unidentifiedCategory}
enable_anti_tracking={enable_anti_tracking}
/>
diff --git a/app/panel/components/Blocking/BlockingHeader.jsx b/app/panel/components/Blocking/BlockingHeader.jsx
index 4ec56c338..3376ce441 100644
--- a/app/panel/components/Blocking/BlockingHeader.jsx
+++ b/app/panel/components/Blocking/BlockingHeader.jsx
@@ -91,7 +91,7 @@ class BlockingHeader extends React.Component {
*/
componentDidMount() {
const {
- actions, categories, smartBlock, smartBlockActive
+ actions, categories, smartBrowse, smartBrowseActive
} = this.props;
const { fromHere } = this.state;
if (categories) {
@@ -107,8 +107,8 @@ class BlockingHeader extends React.Component {
if (typeof actions.updateTrackerCounts === 'function') {
// if we're on GlobalSettings, we don't need to run this function
- const calcSmartBlock = (smartBlockActive && smartBlock) || { blocked: {}, unblocked: {} };
- updateSummaryBlockingCount(categories, calcSmartBlock, actions.updateTrackerCounts);
+ const calcSmartBrowse = (smartBrowseActive && smartBrowse) || { blocked: {}, unblocked: {} };
+ updateSummaryBlockingCount(categories, calcSmartBrowse, actions.updateTrackerCounts);
}
}
@@ -134,8 +134,8 @@ class BlockingHeader extends React.Component {
globalBlocking,
paused_blocking,
sitePolicy,
- smartBlock,
- smartBlockActive,
+ smartBrowse,
+ smartBrowseActive,
showToast
} = this.props;
const globalBlockingBool = !!globalBlocking;
@@ -147,15 +147,15 @@ class BlockingHeader extends React.Component {
}
actions.updateBlockAllTrackers({
- smartBlockActive,
- smartBlock,
+ smartBrowseActive,
+ smartBrowse,
allBlocked,
});
if (typeof actions.updateTrackerCounts === 'function') {
// if we're on GlobalSettings, we don't need to run this function
- const calcSmartBlock = (smartBlockActive && smartBlock) || { blocked: {}, unblocked: {} };
- updateSummaryBlockingCount(categories, calcSmartBlock, actions.updateTrackerCounts);
+ const calcSmartBrowse = (smartBrowseActive && smartBrowse) || { blocked: {}, unblocked: {} };
+ updateSummaryBlockingCount(categories, calcSmartBrowse, actions.updateTrackerCounts);
}
actions.showNotification({
diff --git a/app/panel/components/Blocking/Categories.jsx b/app/panel/components/Blocking/Categories.jsx
index 1c5699935..ecd80ca63 100644
--- a/app/panel/components/Blocking/Categories.jsx
+++ b/app/panel/components/Blocking/Categories.jsx
@@ -42,8 +42,8 @@ class Categories extends React.Component {
show_tracker_urls,
paused_blocking,
language,
- smartBlockActive,
- smartBlock,
+ smartBrowseActive,
+ smartBrowse,
} = this.props;
const globalBlockingBool = !!globalBlocking;
const filteredBool = !!filtered;
@@ -95,8 +95,8 @@ class Categories extends React.Component {
sitePolicy={sitePolicy}
paused_blocking={paused_blocking}
language={language}
- smartBlockActive={smartBlockActive}
- smartBlock={smartBlock}
+ smartBrowseActive={smartBrowseActive}
+ smartBrowse={smartBrowse}
enable_anti_tracking={enable_anti_tracking}
isUnidentified={isUnidentified}
/>
diff --git a/app/panel/components/Blocking/Category.jsx b/app/panel/components/Blocking/Category.jsx
index d84be888c..d8e81d12a 100644
--- a/app/panel/components/Blocking/Category.jsx
+++ b/app/panel/components/Blocking/Category.jsx
@@ -146,8 +146,8 @@ class Category extends React.Component {
globalBlocking,
sitePolicy,
paused_blocking,
- smartBlock,
- smartBlockActive,
+ smartBrowse,
+ smartBrowseActive,
showToast
} = this.props;
const { allShownBlocked } = this.state;
@@ -159,8 +159,8 @@ class Category extends React.Component {
}
actions.updateCategoryBlocked({
- smartBlockActive,
- smartBlock,
+ smartBrowseActive,
+ smartBrowse,
category: category.id,
blocked,
});
@@ -225,8 +225,8 @@ class Category extends React.Component {
showToast,
show_tracker_urls,
language,
- smartBlockActive,
- smartBlock,
+ smartBrowseActive,
+ smartBrowse,
} = this.props;
const {
totalShownBlocked,
@@ -335,8 +335,8 @@ class Category extends React.Component {
sitePolicy={sitePolicy}
paused_blocking={paused_blocking}
language={language}
- smartBlockActive={smartBlockActive}
- smartBlock={smartBlock}
+ smartBrowseActive={smartBrowseActive}
+ smartBrowse={smartBrowse}
isUnidentified={isUnidentified}
/>
)}
diff --git a/app/panel/components/Blocking/Tracker.jsx b/app/panel/components/Blocking/Tracker.jsx
index 89b2a0260..e806a4f04 100644
--- a/app/panel/components/Blocking/Tracker.jsx
+++ b/app/panel/components/Blocking/Tracker.jsx
@@ -64,9 +64,9 @@ class Tracker extends React.Component {
classes.push((tracker.blocked) ? 'blocked' : '');
classes.push((tracker.ss_allowed) ? 'individual-trust' : '');
classes.push((tracker.ss_blocked) ? 'individual-restrict' : '');
- classes.push((tracker.warningCompatibility || tracker.warningInsecure || tracker.warningSlow || tracker.warningSmartBlock) ? 'warning' : '');
- if (tracker.warningSmartBlock) {
- classes.push(tracker.warningSmartBlock === 'blocked' ? 'smart-blocked' : 'smart-unblocked');
+ classes.push((tracker.warningCompatibility || tracker.warningInsecure || tracker.warningSlow || tracker.warningSmartBrowse) ? 'warning' : '');
+ if (tracker.warningSmartBrowse) {
+ classes.push(tracker.warningSmartBrowse === 'blocked' ? 'smart-blocked' : 'smart-unblocked');
} else {
classes.push((tracker.warningCompatibility) ? 'compatibility' : '');
classes.push((tracker.warningInsecure) ? 'insecure' : '');
@@ -74,8 +74,8 @@ class Tracker extends React.Component {
}
// Create tooltips for tracker alerts
- if (tracker.warningSmartBlock) {
- updated_title = tracker.warningSmartBlock === 'blocked' ? t('panel_tracker_warning_smartblock_tooltip') : t('panel_tracker_warning_smartunblock_tooltip');
+ if (tracker.warningSmartBrowse) {
+ updated_title = tracker.warningSmartBrowse === 'blocked' ? t('panel_tracker_warning_smartbrowse_tooltip') : t('panel_tracker_warning_smartunblock_tooltip');
} else if (tracker.warningCompatibility) {
updated_title = t('panel_tracker_warning_compatibility_tooltip');
} else if (tracker.warningInsecure && tracker.warningSlow) {
@@ -194,8 +194,8 @@ class Tracker extends React.Component {
tracker,
paused_blocking,
sitePolicy,
- smartBlockActive,
- smartBlock,
+ smartBrowseActive,
+ smartBrowse,
cat_id,
} = this.props;
const blocked = !tracker.blocked;
@@ -205,8 +205,8 @@ class Tracker extends React.Component {
}
actions.updateTrackerBlocked({
- smartBlockActive,
- smartBlock,
+ smartBrowseActive,
+ smartBrowse,
app_id: tracker.id,
cat_id,
blocked,
diff --git a/app/panel/components/Blocking/Trackers.jsx b/app/panel/components/Blocking/Trackers.jsx
index 6568074e5..04103a99c 100644
--- a/app/panel/components/Blocking/Trackers.jsx
+++ b/app/panel/components/Blocking/Trackers.jsx
@@ -51,8 +51,8 @@ class Trackers extends React.Component {
show_tracker_urls,
sitePolicy,
paused_blocking,
- smartBlockActive,
- smartBlock,
+ smartBrowseActive,
+ smartBrowse,
} = this.props;
let trackerList;
if (globalBlocking) {
@@ -85,8 +85,8 @@ class Trackers extends React.Component {
sitePolicy={sitePolicy}
paused_blocking={paused_blocking}
language={language}
- smartBlockActive={smartBlockActive}
- smartBlock={smartBlock}
+ smartBrowseActive={smartBrowseActive}
+ smartBrowse={smartBrowse}
isUnidentified={isUnidentified}
/>
));
diff --git a/app/panel/components/BuildingBlocks/CliqzFeature.jsx b/app/panel/components/BuildingBlocks/CliqzFeature.jsx
index 3abc03dc9..2a900b5eb 100644
--- a/app/panel/components/BuildingBlocks/CliqzFeature.jsx
+++ b/app/panel/components/BuildingBlocks/CliqzFeature.jsx
@@ -40,8 +40,8 @@ class CliqzFeature extends React.Component {
return t('tooltip_ad_block_on');
case 'anti_track':
return t('tooltip_anti_track_on');
- case 'smart_block':
- return t('tooltip_smart_block_on');
+ case 'smart_browse':
+ return t('tooltip_smart_browse_on');
default:
return false;
}
@@ -51,8 +51,8 @@ class CliqzFeature extends React.Component {
return t('ad_blocking_DESC');
case 'anti_track':
return t('anti_tracking_DESC');
- case 'smart_block':
- return t('smart_blocking_DESC');
+ case 'smart_browse':
+ return t('smart_browsing_DESC');
default:
return false;
}
@@ -64,11 +64,11 @@ class CliqzFeature extends React.Component {
switch (type) {
case 'ad_block':
- return t('enhanced_ad_blocking');
+ return t('ad_blocking');
case 'anti_track':
- return t('enhanced_anti_tracking');
- case 'smart_block':
- return t('smart_blocking');
+ return t('anti_tracking');
+ case 'smart_browse':
+ return t('smart_browsing');
default:
return false;
}
@@ -137,11 +137,11 @@ class CliqzFeature extends React.Component {
const featureType = type === 'anti_track' ? 'anti_tracking' : type;
let featureName;
if (featureType === 'anti_tracking') {
- featureName = t('enhanced_anti_tracking');
+ featureName = t('anti_tracking');
} else if (featureType === 'ad_block') {
- featureName = t('enhanced_ad_blocking');
- } else if (featureType === 'smart_block') {
- featureName = t('smart_blocking');
+ featureName = t('ad_blocking');
+ } else if (featureType === 'smart_browse') {
+ featureName = t('smart_browsing');
}
return (
@@ -168,7 +168,7 @@ CliqzFeature.propTypes = {
type: PropTypes.oneOf([
'anti_track',
'ad_block',
- 'smart_block',
+ 'smart_browse',
]).isRequired,
active: PropTypes.bool,
cliqzInactive: PropTypes.oneOfType([
diff --git a/app/panel/components/BuildingBlocks/__tests__/CliqzFeature.jsx b/app/panel/components/BuildingBlocks/__tests__/CliqzFeature.jsx
index cba12eac1..8a4fde87f 100644
--- a/app/panel/components/BuildingBlocks/__tests__/CliqzFeature.jsx
+++ b/app/panel/components/BuildingBlocks/__tests__/CliqzFeature.jsx
@@ -49,7 +49,7 @@ describe('app/panel/components/CliqzFeature.jsx', () => {
/>
{}}
- type="smart_block"
+ type="smart_browse"
active={false}
cliqzInactive={false}
isSmaller={false}
@@ -86,7 +86,7 @@ describe('app/panel/components/CliqzFeature.jsx', () => {
/>
{}}
- type="smart_block"
+ type="smart_browse"
active
cliqzInactive
isSmaller={false}
@@ -127,7 +127,7 @@ describe('app/panel/components/CliqzFeature.jsx', () => {
/>
{}}
- type="smart_block"
+ type="smart_browse"
active
cliqzInactive
isSmaller
@@ -148,7 +148,7 @@ describe('app/panel/components/CliqzFeature.jsx', () => {
const component = shallow(
- enhanced_anti_tracking
+ anti_tracking
- enhanced_ad_blocking
+ ad_blocking
- smart_blocking
+ smart_browsing
@@ -76,7 +76,7 @@ exports[`app/panel/components/CliqzFeature.jsx Snapshot tests with react-test-re
- enhanced_anti_tracking
+ anti_tracking
- enhanced_ad_blocking
+ ad_blocking
- smart_blocking
+ smart_browsing
@@ -135,7 +135,7 @@ exports[`app/panel/components/CliqzFeature.jsx Snapshot tests with react-test-re
- enhanced_anti_tracking
+ anti_tracking
- enhanced_ad_blocking
+ ad_blocking
- smart_blocking
+ smart_browsing
diff --git a/app/panel/components/Summary.jsx b/app/panel/components/Summary.jsx
index 79c0faecd..323444255 100644
--- a/app/panel/components/Summary.jsx
+++ b/app/panel/components/Summary.jsx
@@ -143,9 +143,9 @@ class Summary extends React.Component {
}
/**
- * Handles clicking on Cliqz Features: AntiTracking, AdBlocking, SmartBlocking
+ * Handles clicking on Cliqz Features: AntiTracking, AdBlocking, SmartBrowsing
* @param {Object} options options including:
- * feature: enable_anti_tracking, enable_ad_block, enable_smart_block
+ * feature: enable_anti_tracking, enable_ad_block, enable_smart_browse
* status: whether the feature should be turned on or off
* text: the text for the notification.
*/
@@ -387,9 +387,9 @@ class Summary extends React.Component {
}
_sbBlocked() {
- const { smartBlock, trackerCounts } = this.props;
+ const { smartBrowse, trackerCounts } = this.props;
- let sbBlocked = (smartBlock && smartBlock.blocked && Object.keys(smartBlock.blocked).length) || 0;
+ let sbBlocked = (smartBrowse && smartBrowse.blocked && Object.keys(smartBrowse.blocked).length) || 0;
if (sbBlocked === trackerCounts.sbBlocked) {
sbBlocked = 0;
}
@@ -398,9 +398,9 @@ class Summary extends React.Component {
}
_sbAllowed() {
- const { smartBlock, trackerCounts } = this.props;
+ const { smartBrowse, trackerCounts } = this.props;
- let sbAllowed = (smartBlock && smartBlock.unblocked && Object.keys(smartBlock.unblocked).length) || 0;
+ let sbAllowed = (smartBrowse && smartBrowse.unblocked && Object.keys(smartBrowse.unblocked).length) || 0;
if (sbAllowed === trackerCounts.sbAllowed) {
sbAllowed = 0;
}
@@ -409,9 +409,9 @@ class Summary extends React.Component {
}
_sbAdjust() {
- const { enable_smart_block } = this.props;
+ const { enable_smart_browse } = this.props;
- return enable_smart_block && ((this._sbBlocked() - this._sbAllowed()) || 0);
+ return enable_smart_browse && ((this._sbBlocked() - this._sbAllowed()) || 0);
}
_totalTrackersBlockedCount() {
@@ -460,7 +460,7 @@ class Summary extends React.Component {
return paused_blocking || sitePolicy || disableBlocking || IS_CLIQZ;
}
- _isSmartBlockingInactive() {
+ _isSmartBrowsingInactive() {
const { paused_blocking, sitePolicy } = this.props;
const { disableBlocking } = this.state;
@@ -709,9 +709,9 @@ class Summary extends React.Component {
);
}
- _renderCliqzSmartBlock() {
+ _renderCliqzSmartBrowse() {
const {
- enable_smart_block,
+ enable_smart_browse,
is_expert,
current_theme,
} = this.props;
@@ -721,9 +721,9 @@ class Summary extends React.Component {
{this._renderCliqzAntiTracking()}
{this._renderCliqzAdBlock()}
- {this._renderCliqzSmartBlock()}
+ {this._renderCliqzSmartBrowse()}
{this._renderStatsNavicon()}
{enable_offers && this._renderRewardsNavicon()}
diff --git a/app/panel/containers/BlockingContainer.js b/app/panel/containers/BlockingContainer.js
index ab4509022..4460e047a 100644
--- a/app/panel/containers/BlockingContainer.js
+++ b/app/panel/containers/BlockingContainer.js
@@ -30,12 +30,12 @@ const mapStateToProps = state => ({
...state.blocking,
is_expanded: state.panel.is_expanded,
language: state.panel.language,
- smartBlock: state.panel.smartBlock,
+ smartBrowse: state.panel.smartBrowse,
enable_anti_tracking: state.panel.enable_anti_tracking,
pageHost: state.summary.pageHost,
paused_blocking: state.summary.paused_blocking,
sitePolicy: state.summary.sitePolicy,
- smartBlockActive: state.panel.enable_smart_block
+ smartBrowseActive: state.panel.enable_smart_browse
});
/**
* Bind Blocking view component action creators using Redux's bindActionCreators
diff --git a/app/panel/reducers/panel.js b/app/panel/reducers/panel.js
index 945b0a872..e3f5f9b1a 100644
--- a/app/panel/reducers/panel.js
+++ b/app/panel/reducers/panel.js
@@ -40,7 +40,7 @@ import { setTheme } from '../utils/utils';
const initialState = {
enable_ad_block: true,
enable_anti_tracking: true,
- enable_smart_block: true,
+ enable_smart_browse: true,
initialized: false, // prevent rendering subviews before UPDATE_PANEL_DATA resolves
is_expanded: false,
is_expert: false,
@@ -317,8 +317,8 @@ export default (state = initialState, action) => {
case 'enable_ad_block':
pingName = action.data.isEnabled ? 'adblock_off' : 'adblock_on';
break;
- case 'enable_smart_block':
- pingName = action.data.isEnabled ? 'smartblock_off' : 'smartblock_on';
+ case 'enable_smart_browse':
+ pingName = action.data.isEnabled ? 'smartbrowse_off' : 'smartbrowse_on';
break;
default:
break;
diff --git a/app/panel/utils/blocking.js b/app/panel/utils/blocking.js
index d3166355d..aeb0a0de7 100644
--- a/app/panel/utils/blocking.js
+++ b/app/panel/utils/blocking.js
@@ -19,10 +19,10 @@ import { sendMessage } from './msg';
* Dispatch action to SummaryActions to update trackerCounts.
* @memberOf PanelUtils
* @param {array} categories array of categories
- * @param {object} smartBlock blocked and unblocked of Smart Blocking
+ * @param {object} smartBrowse blocked and unblocked of Smart-Browsing
* @param {function} updateTrackerCounts from SummaryActions
*/
-export function updateSummaryBlockingCount(categories = [], smartBlock, updateTrackerCounts) {
+export function updateSummaryBlockingCount(categories = [], smartBrowse, updateTrackerCounts) {
let numTotal = 0;
let numTotalBlocked = 0;
let numTotalSsBlocked = 0;
@@ -33,8 +33,8 @@ export function updateSummaryBlockingCount(categories = [], smartBlock, updateTr
categories.forEach((categoryEl) => {
categoryEl.trackers.forEach((trackerEl) => {
numTotal++;
- const sbBlocked = smartBlock.blocked.hasOwnProperty(trackerEl.id);
- const sbUnblocked = smartBlock.unblocked.hasOwnProperty(trackerEl.id);
+ const sbBlocked = smartBrowse.blocked.hasOwnProperty(trackerEl.id);
+ const sbUnblocked = smartBrowse.unblocked.hasOwnProperty(trackerEl.id);
if (trackerEl.ss_blocked || sbBlocked || (trackerEl.blocked && !trackerEl.ss_allowed && !sbUnblocked)) {
numTotalBlocked++;
@@ -75,14 +75,14 @@ export function updateBlockAllTrackers(state, action) {
const blocked = !action.data.allBlocked;
const updated_app_ids = JSON.parse(JSON.stringify(state.selected_app_ids)) || {};
const updated_categories = JSON.parse(JSON.stringify(state.categories)) || [];
- const { smartBlockActive } = action.data;
- const smartBlock = (smartBlockActive && action.data.smartBlock) || { blocked: {}, unblocked: {} };
+ const { smartBrowseActive } = action.data;
+ const smartBrowse = (smartBrowseActive && action.data.smartBrowse) || { blocked: {}, unblocked: {} };
updated_categories.forEach((categoryEl) => {
categoryEl.num_blocked = 0;
categoryEl.trackers.forEach((trackerEl) => {
- const sbBlocked = smartBlock.blocked.hasOwnProperty(trackerEl.id);
- const sbUnblocked = smartBlock.unblocked.hasOwnProperty(trackerEl.id);
+ const sbBlocked = smartBrowse.blocked.hasOwnProperty(trackerEl.id);
+ const sbUnblocked = smartBrowse.unblocked.hasOwnProperty(trackerEl.id);
if (trackerEl.shouldShow) {
trackerEl.blocked = blocked;
@@ -116,16 +116,16 @@ export function updateBlockAllTrackers(state, action) {
* @return {Object} updated categories and selected app ids
*/
export function updateCategoryBlocked(state, action) {
- const { blocked, smartBlockActive } = action.data;
- const smartBlock = (smartBlockActive && action.data.smartBlock) || { blocked: {}, unblocked: {} };
+ const { blocked, smartBrowseActive } = action.data;
+ const smartBrowse = (smartBrowseActive && action.data.smartBrowse) || { blocked: {}, unblocked: {} };
const updated_app_ids = JSON.parse(JSON.stringify(state.selected_app_ids)) || {};
const updated_categories = JSON.parse(JSON.stringify(state.categories)); // deep clone
const catIndex = updated_categories.findIndex(item => item.id === action.data.category);
const updated_category = updated_categories[catIndex];
updated_category.num_blocked = 0;
updated_category.trackers.forEach((trackerEl) => {
- const sbBlocked = smartBlock.blocked.hasOwnProperty(trackerEl.id);
- const sbUnblocked = smartBlock.unblocked.hasOwnProperty(trackerEl.id);
+ const sbBlocked = smartBrowse.blocked.hasOwnProperty(trackerEl.id);
+ const sbUnblocked = smartBrowse.unblocked.hasOwnProperty(trackerEl.id);
if (trackerEl.shouldShow) {
trackerEl.blocked = blocked;
@@ -185,8 +185,8 @@ export function updateTrackerBlocked(state, action) {
return {};
}
- const { blocked, smartBlockActive } = action.data;
- const smartBlock = (smartBlockActive && action.data.smartBlock) || { blocked: {}, unblocked: {} };
+ const { blocked, smartBrowseActive } = action.data;
+ const smartBrowse = (smartBrowseActive && action.data.smartBrowse) || { blocked: {}, unblocked: {} };
const updated_app_ids = JSON.parse(JSON.stringify(state.selected_app_ids)) || {};
const updated_categories = JSON.parse(JSON.stringify(state.categories)) || []; // deep clone
const catIndex = updated_categories.findIndex(item => item.id === action.data.cat_id);
@@ -194,8 +194,8 @@ export function updateTrackerBlocked(state, action) {
updated_category.num_blocked = 0;
updated_category.trackers.forEach((trackerEl) => {
- const sbBlocked = smartBlock.blocked.hasOwnProperty(trackerEl.id);
- const sbUnblocked = smartBlock.unblocked.hasOwnProperty(trackerEl.id);
+ const sbBlocked = smartBrowse.blocked.hasOwnProperty(trackerEl.id);
+ const sbUnblocked = smartBrowse.unblocked.hasOwnProperty(trackerEl.id);
if (trackerEl.shouldShow) {
if (trackerEl.id === action.data.app_id) {
diff --git a/app/scss/android/_blocking_tab.scss b/app/scss/android/_blocking_tab.scss
index 3ce6eeb0d..dd13b35ef 100644
--- a/app/scss/android/_blocking_tab.scss
+++ b/app/scss/android/_blocking_tab.scss
@@ -211,13 +211,13 @@
}
}
- .OverrideSmartBlock {
+ .OverrideSmartBrowse {
position: relative;
cursor: pointer;
height: 25px;
width: 25px;
margin-right: 5px;
- background-image: buildIconSmartBlocking($ghosty-blue);
+ background-image: buildIconSmartBrowsing($ghosty-blue);
background-size: 40px 40px;
background-position: center;
}
diff --git a/app/scss/android/_overview_tab.scss b/app/scss/android/_overview_tab.scss
index 16ccb95f5..8523289d5 100644
--- a/app/scss/android/_overview_tab.scss
+++ b/app/scss/android/_overview_tab.scss
@@ -114,7 +114,7 @@
.CliqzFeature__status { color: $cliqz-feature--blue; }
.CliqzFeature__icon--anti-track { background-image: buildIconAntiTracking($cliqz-feature--blue); }
.CliqzFeature__icon--ad-block { background-image: buildIconAdBlocking($cliqz-feature--blue); }
- .CliqzFeature__icon--smart-block { background-image: buildIconSmartBlocking($cliqz-feature--blue); }
+ .CliqzFeature__icon--smart-browse { background-image: buildIconSmartBrowsing($cliqz-feature--blue); }
.CliqzFeature__feature-name { color: $cliqz-feature--blue; }
}
}
@@ -124,7 +124,7 @@
.CliqzFeature__status { color: $cliqz-feature--gray; }
.CliqzFeature__icon--anti-track { background-image: buildIconAntiTracking($cliqz-feature--gray); }
.CliqzFeature__icon--ad-block { background-image: buildIconAdBlocking($cliqz-feature--gray); }
- .CliqzFeature__icon--smart-block { background-image: buildIconSmartBlocking($cliqz-feature--gray); }
+ .CliqzFeature__icon--smart-browse { background-image: buildIconSmartBrowsing($cliqz-feature--gray); }
.CliqzFeature__feature-name { color: $cliqz-feature--gray; }
}
}
diff --git a/app/scss/partials/_blocking.scss b/app/scss/partials/_blocking.scss
index a9f995c28..ec0303ddf 100644
--- a/app/scss/partials/_blocking.scss
+++ b/app/scss/partials/_blocking.scss
@@ -76,7 +76,7 @@
}
&.smart-blocked .warning-image,
&.smart-unblocked .warning-image {
- background-image: buildIconSmartBlockingNoCircle(#1dafed);
+ background-image: buildIconSmartBrowsingNoCircle(#1dafed);
}
}
}
diff --git a/app/scss/partials/_cliqz_feature.scss b/app/scss/partials/_cliqz_feature.scss
index d88f0b5e2..e7f228d97 100644
--- a/app/scss/partials/_cliqz_feature.scss
+++ b/app/scss/partials/_cliqz_feature.scss
@@ -96,14 +96,14 @@ $cliqz-feature--darker-gray: #a4a4a4;
}
.CliqzFeature__icon--anti-track { background-image: buildIconAntiTracking($cliqz-feature--blue); }
.CliqzFeature__icon--ad-block { background-image: buildIconAdBlocking($cliqz-feature--blue); }
- .CliqzFeature__icon--smart-block { background-image: buildIconSmartBlocking($cliqz-feature--blue); }
+ .CliqzFeature__icon--smart-browse { background-image: buildIconSmartBrowsing($cliqz-feature--blue); }
.CliqzFeature__feature-name { color: $cliqz-feature--blue; }
&:hover {
.CliqzFeature__status { color: $cliqz-feature--darker-blue; }
.CliqzFeature__icon--anti-track { background-image: buildIconAntiTracking($cliqz-feature--darker-blue); }
.CliqzFeature__icon--ad-block { background-image: buildIconAdBlocking($cliqz-feature--darker-blue); }
- .CliqzFeature__icon--smart-block { background-image: buildIconSmartBlocking($cliqz-feature--darker-blue); }
+ .CliqzFeature__icon--smart-browse { background-image: buildIconSmartBrowsing($cliqz-feature--darker-blue); }
.CliqzFeature__feature-name { color: $cliqz-feature--darker-blue; }
}
}
@@ -112,7 +112,7 @@ $cliqz-feature--darker-gray: #a4a4a4;
.CliqzFeature__status { color: $cliqz-feature--pale-blue; }
.CliqzFeature__icon--anti-track { background-image: buildIconAntiTracking($cliqz-feature--pale-blue); }
.CliqzFeature__icon--ad-block { background-image: buildIconAdBlocking($cliqz-feature--pale-blue); }
- .CliqzFeature__icon--smart-block { background-image: buildIconSmartBlocking($cliqz-feature--pale-blue); }
+ .CliqzFeature__icon--smart-browse { background-image: buildIconSmartBrowsing($cliqz-feature--pale-blue); }
.CliqzFeature__feature-name { color: $cliqz-feature--pale-blue; }
}
@@ -121,14 +121,14 @@ $cliqz-feature--darker-gray: #a4a4a4;
.CliqzFeature__status { color: $cliqz-feature--gray; }
.CliqzFeature__icon--anti-track { background-image: buildIconAntiTracking($cliqz-feature--gray); }
.CliqzFeature__icon--ad-block { background-image: buildIconAdBlocking($cliqz-feature--gray); }
- .CliqzFeature__icon--smart-block { background-image: buildIconSmartBlocking($cliqz-feature--gray); }
+ .CliqzFeature__icon--smart-browse { background-image: buildIconSmartBrowsing($cliqz-feature--gray); }
.CliqzFeature__feature-name { color: $cliqz-feature--gray; }
&:hover {
.CliqzFeature__status { color: $cliqz-feature--darker-gray; }
.CliqzFeature__icon--anti-track { background-image: buildIconAntiTracking($cliqz-feature--darker-gray); }
.CliqzFeature__icon--ad-block { background-image: buildIconAdBlocking($cliqz-feature--darker-gray); }
- .CliqzFeature__icon--smart-block { background-image: buildIconSmartBlocking($cliqz-feature--darker-gray); }
+ .CliqzFeature__icon--smart-browse { background-image: buildIconSmartBrowsing($cliqz-feature--darker-gray); }
.CliqzFeature__feature-name { color: $cliqz-feature--darker-gray; }
}
}
@@ -137,6 +137,6 @@ $cliqz-feature--darker-gray: #a4a4a4;
.CliqzFeature__status { color: $cliqz-feature--light-gray; }
.CliqzFeature__icon--anti-track { background-image: buildIconAntiTracking($cliqz-feature--light-gray); }
.CliqzFeature__icon--ad-block { background-image: buildIconAdBlocking($cliqz-feature--light-gray); }
- .CliqzFeature__icon--smart-block { background-image: buildIconSmartBlocking($cliqz-feature--light-gray); }
+ .CliqzFeature__icon--smart-browse { background-image: buildIconSmartBrowsing($cliqz-feature--light-gray); }
.CliqzFeature__feature-name { color: $cliqz-feature--light-gray; }
}
diff --git a/app/scss/partials/_hub_svgs.scss b/app/scss/partials/_hub_svgs.scss
index 63ad5deb3..2f7da5414 100644
--- a/app/scss/partials/_hub_svgs.scss
+++ b/app/scss/partials/_hub_svgs.scss
@@ -101,10 +101,10 @@
@function buildAdBlockActiveIcon($primary-color) {
@return url('data:image/svg+xml;charset%3dUS-ASCII,%3Csvg%20width%3D%2223%22%20height%3D%2232%22%20xmlns%3D%22http://www.w3.org/2000/svg%22%3E%3Cg%20transform%3D%22translate(1.12%20.56)%22%20fill%3D%22#{_url-friendly-color($primary-color)}%22%20fill-rule%3D%22evenodd%22%3E%3Cpath%20d%3D%22M4.525%2026.57c.713.714%201.423%201.429%202.14%202.137.052.052.153.08.233.08%202.443.003%204.885.004%207.327-.002a.42.42%200%200%200%20.265-.109c1.73-1.723%203.457-3.45%205.181-5.181a.418.418%200%200%200%20.114-.263c.007-2.45.006-4.9.004-7.35-.002-.067-.017-.154-.059-.199-.717-.728-1.439-1.45-2.152-2.167L4.525%2026.57m-.99-.982l13.05-13.051c-.7-.7-1.409-1.413-2.126-2.122a.36.36%200%200%200-.231-.081%201608.44%201608.44%200%200%200-7.327.001.414.414%200%200%200-.267.106%201715.804%201715.804%200%200%200-5.197%205.195.362.362%200%200%200-.102.225c-.005%202.465-.005%204.93-.001%207.393%200%20.067.025.15.07.194.712.722%201.43%201.439%202.13%202.14m17.582-6.014c0%201.317-.005%202.634.004%203.95a.92.92%200%200%201-.288.707%201994.487%201994.487%200%200%200-5.603%205.601.903.903%200%200%201-.685.288c-2.654-.006-5.31-.006-7.966%200a.909.909%200%200%201-.685-.286c-1.868-1.875-3.74-3.748-5.617-5.617A.872.872%200%200%201%200%2023.55C.006%2020.895.006%2018.24%200%2015.583c0-.277.084-.49.28-.686%201.877-1.87%203.75-3.741%205.62-5.618A.88.88%200%200%201%206.562%209c2.663.005%205.326.005%207.989%200%20.27%200%20.477.087.665.277%201.875%201.881%203.754%203.758%205.635%205.633.183.183.27.386.268.647-.007%201.339-.004%202.678-.004%204.017%22%20stroke%3D%22#{_url-friendly-color($primary-color)}%22/%3E%3Ccircle%20cx%3D%2210.92%22%20cy%3D%221.92%22%20r%3D%221.92%22/%3E%3C/g%3E%3C/svg%3E');
}
-@function buildSmartBlockingIcon($primary-color) { // Also used in Tutorial Anti Suite View
+@function buildSmartBrowsingIcon($primary-color) { // Also used in Tutorial Anti Suite View
@return url('data:image/svg+xml;charset%3dUS-ASCII,%3Csvg%20width%3D%2218%22%20height%3D%2236%22%20xmlns%3D%22http://www.w3.org/2000/svg%22%3E%3Cg%20transform%3D%22translate(.04%20.32)%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Cpath%20d%3D%22M15.338%2017.571c-.093%201.622-.669%203.052-1.588%204.364-.413.591-.832%201.177-1.233%201.779-.573.858-1.032%201.77-1.208%202.801-.03.17-.136.157-.253.157l-2.424-.001c-.798%200-1.597-.005-2.396.003-.175.002-.237-.048-.272-.23-.19-.997-.632-1.889-1.192-2.724-.477-.709-.974-1.405-1.453-2.114a8.02%208.02%200%200%201-1.388-4.265c-.108-2.725%201.427-5.103%204.017-6.207%203.32-1.413%207.245.005%208.8%203.185.5%201.026.654%202.116.59%203.252zM6.098%2029.23h5.092v-.61H6.098v.61zm4.569%202.592H6.62c-.488%200-.577-.104-.514-.631h5.069c.07.519-.022.63-.508.63zm5.99-17.957c-1.392-3.063-3.808-4.764-7.091-5.157-2.796-.336-5.228.589-7.21%202.584C.143%2013.52-.388%2016.245.254%2019.258c.337%201.575%201.103%202.945%202.02%204.243.42.597.833%201.202%201.22%201.82.356.574.61%201.2.634%201.882.03.786.008%201.573.008%202.36h.03c0%20.653%200%201.306.002%201.959.006%201.164.914%202.147%202.065%202.223.15.01.202.054.239.207a2.232%202.232%200%200%200%202.16%201.732c1.042.001%201.928-.698%202.183-1.738.033-.136.07-.189.216-.2a2.245%202.245%200%200%200%202.088-2.258c0-1.216.01-2.432-.003-3.65-.011-.909.199-1.755.678-2.523.386-.619.798-1.225%201.222-1.817%201.212-1.698%202.07-3.531%202.23-5.649.105-1.376-.017-2.722-.59-3.984z%22%20fill%3D%22#{_url-friendly-color($primary-color)}%22/%3E%3Cpath%20d%3D%22M8.732%2015.614a.31.31%200%200%200-.184%200L4.596%2016.67a.356.356%200%200%200-.276.351c.018%202.834%201.526%205.464%204.118%207.223a.37.37%200%200%200%20.202.056.37.37%200%200%200%20.202-.056c2.592-1.76%204.1-4.389%204.118-7.223a.356.356%200%200%200-.276-.351l-3.952-1.056z%22%20stroke%3D%22#{_url-friendly-color($primary-color)}%22%20stroke-width%3D%221.44%22/%3E%3C/g%3E%3C/svg%3E');
}
-@function buildSmartBlockingActiveIcon($primary-color) {
+@function buildSmartBrowsingActiveIcon($primary-color) {
@return url('data:image/svg+xml;charset%3dUS-ASCII,%3Csvg%20width%3D%2218%22%20height%3D%2236%22%20xmlns%3D%22http://www.w3.org/2000/svg%22%3E%3Cg%20transform%3D%22translate(.04%20.32)%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Cpath%20d%3D%22M15.338%2017.571c-.093%201.622-.669%203.052-1.588%204.364-.413.591-.832%201.177-1.233%201.779-.573.858-1.032%201.77-1.208%202.801-.03.17-.136.157-.253.157l-2.424-.001c-.798%200-1.597-.005-2.396.003-.175.002-.237-.048-.272-.23-.19-.997-.632-1.889-1.192-2.724-.477-.709-.974-1.405-1.453-2.114a8.02%208.02%200%200%201-1.388-4.265c-.108-2.725%201.427-5.103%204.017-6.207%203.32-1.413%207.245.005%208.8%203.185.5%201.026.654%202.116.59%203.252zM6.098%2029.23h5.092v-.61H6.098v.61zm4.569%202.592H6.62c-.488%200-.577-.104-.514-.631h5.069c.07.519-.022.63-.508.63zm5.99-17.957c-1.392-3.063-3.808-4.764-7.091-5.157-2.796-.336-5.228.589-7.21%202.584C.143%2013.52-.388%2016.245.254%2019.258c.337%201.575%201.103%202.945%202.02%204.243.42.597.833%201.202%201.22%201.82.356.574.61%201.2.634%201.882.03.786.008%201.573.008%202.36h.03c0%20.653%200%201.306.002%201.959.006%201.164.914%202.147%202.065%202.223.15.01.202.054.239.207a2.232%202.232%200%200%200%202.16%201.732c1.042.001%201.928-.698%202.183-1.738.033-.136.07-.189.216-.2a2.245%202.245%200%200%200%202.088-2.258c0-1.216.01-2.432-.003-3.65-.011-.909.199-1.755.678-2.523.386-.619.798-1.225%201.222-1.817%201.212-1.698%202.07-3.531%202.23-5.649.105-1.376-.017-2.722-.59-3.984z%22%20fill%3D%22#{_url-friendly-color($primary-color)}%22/%3E%3Cpath%20d%3D%22M8.732%2015.614a.31.31%200%200%200-.184%200L4.596%2016.67a.356.356%200%200%200-.276.351c.018%202.834%201.526%205.464%204.118%207.223a.37.37%200%200%200%20.202.056.37.37%200%200%200%20.202-.056c2.592-1.76%204.1-4.389%204.118-7.223a.356.356%200%200%200-.276-.351l-3.952-1.056z%22%20stroke%3D%22#{_url-friendly-color($primary-color)}%22%20stroke-width%3D%221.44%22/%3E%3Ccircle%20fill%3D%22#{_url-friendly-color($primary-color)}%22%20cx%3D%228.92%22%20cy%3D%221.92%22%20r%3D%221.92%22/%3E%3C/g%3E%3C/svg%3E');
}
@function buildGhosteryRewardsIcon($primary-color) {
diff --git a/app/scss/partials/_svgs.scss b/app/scss/partials/_svgs.scss
index 80029dd58..8a51caae9 100644
--- a/app/scss/partials/_svgs.scss
+++ b/app/scss/partials/_svgs.scss
@@ -12,7 +12,7 @@
*/
// Used in Blocking
-@function buildIconSmartBlockingNoCircle($stroke-color) {
+@function buildIconSmartBrowsingNoCircle($stroke-color) {
@return url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2250%22%20height%3D%2250%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20fill%3D%22#{url-friendly-colour($stroke-color)}%22%20d%3D%22M31.977%2020.24c-.097%201.677-.697%203.156-1.654%204.514-.43.61-.867%201.217-1.285%201.84-.597.887-1.074%201.832-1.258%202.898-.03.175-.141.162-.263.162l-2.525-.001c-.832%200-1.663-.005-2.497.003-.181.002-.246-.05-.283-.238-.197-1.031-.657-1.954-1.241-2.818-.497-.733-1.015-1.454-1.514-2.187A8.257%208.257%200%200%201%2018.011%2020c-.112-2.82%201.486-5.279%204.185-6.42%203.458-1.462%207.547.004%209.166%203.293.521%201.062.682%202.19.615%203.365zM22.352%2032.3v-.63h5.305v.63h-5.305zm4.76%202.681h-4.216c-.508%200-.602-.108-.536-.653h5.28c.075.537-.022.653-.529.653zm6.238-18.576c-1.449-3.169-3.966-4.928-7.385-5.335-2.913-.348-5.446.61-7.511%202.673-2.305%202.306-2.858%205.124-2.19%208.241.351%201.63%201.149%203.046%202.104%204.39.438.617.869%201.243%201.271%201.883.372.593.635%201.241.661%201.946.03.814.008%201.627.008%202.441h.032c0%20.676-.001%201.351.002%202.027.006%201.204.952%202.22%202.15%202.3.158.01.21.056.25.214a2.322%202.322%200%200%200%204.524-.007c.034-.14.072-.194.225-.206a2.329%202.329%200%200%200%202.174-2.337c0-1.257.01-2.515-.003-3.774-.011-.941.208-1.816.706-2.61.402-.64.832-1.268%201.274-1.88%201.263-1.757%202.155-3.653%202.323-5.844.109-1.423-.018-2.816-.615-4.122z%22/%3E%3Cpath%20stroke%3D%22#{url-friendly-colour($stroke-color)}%22%20stroke-width%3D%221.5%22%20fill%3D%22none%22%20d%3D%22M25.096%2018.214a.324.324%200%200%200-.192%200l-4.117%201.092a.37.37%200%200%200-.287.364c.02%202.932%201.59%205.652%204.29%207.472a.387.387%200%200%200%20.21.058c.077%200%20.153-.02.21-.058%202.7-1.82%204.27-4.54%204.29-7.472a.37.37%200%200%200-.287-.364l-4.117-1.092z%22/%3E%3C/svg%3E');
}
@@ -28,7 +28,7 @@
}
// Used in Cliqz Features
-@function buildIconSmartBlocking($stroke-color) {
+@function buildIconSmartBrowsing($stroke-color) {
@return url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2250%22%20height%3D%2250%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Ccircle%20stroke%3D%22#{url-friendly-colour($stroke-color)}%22%20stroke-width%3D%222%22%20fill%3D%22none%22%20cx%3D%2225%22%20cy%3D%2225%22%20r%3D%2223%22/%3E%3Cpath%20fill%3D%22#{url-friendly-colour($stroke-color)}%22%20d%3D%22M31.977%2020.24c-.097%201.677-.697%203.156-1.654%204.514-.43.61-.867%201.217-1.285%201.84-.597.887-1.074%201.832-1.258%202.898-.03.175-.141.162-.263.162l-2.525-.001c-.832%200-1.663-.005-2.497.003-.181.002-.246-.05-.283-.238-.197-1.031-.657-1.954-1.241-2.818-.497-.733-1.015-1.454-1.514-2.187A8.257%208.257%200%200%201%2018.011%2020c-.112-2.82%201.486-5.279%204.185-6.42%203.458-1.462%207.547.004%209.166%203.293.521%201.062.682%202.19.615%203.365zM22.352%2032.3v-.63h5.305v.63h-5.305zm4.76%202.681h-4.216c-.508%200-.602-.108-.536-.653h5.28c.075.537-.022.653-.529.653zm6.238-18.576c-1.449-3.169-3.966-4.928-7.385-5.335-2.913-.348-5.446.61-7.511%202.673-2.305%202.306-2.858%205.124-2.19%208.241.351%201.63%201.149%203.046%202.104%204.39.438.617.869%201.243%201.271%201.883.372.593.635%201.241.661%201.946.03.814.008%201.627.008%202.441h.032c0%20.676-.001%201.351.002%202.027.006%201.204.952%202.22%202.15%202.3.158.01.21.056.25.214a2.322%202.322%200%200%200%204.524-.007c.034-.14.072-.194.225-.206a2.329%202.329%200%200%200%202.174-2.337c0-1.257.01-2.515-.003-3.774-.011-.941.208-1.816.706-2.61.402-.64.832-1.268%201.274-1.88%201.263-1.757%202.155-3.653%202.323-5.844.109-1.423-.018-2.816-.615-4.122z%22/%3E%3Cpath%20stroke%3D%22#{url-friendly-colour($stroke-color)}%22%20stroke-width%3D%221.5%22%20fill%3D%22none%22%20d%3D%22M25.096%2018.214a.324.324%200%200%200-.192%200l-4.117%201.092a.37.37%200%200%200-.287.364c.02%202.932%201.59%205.652%204.29%207.472a.387.387%200%200%200%20.21.058c.077%200%20.153-.02.21-.058%202.7-1.82%204.27-4.54%204.29-7.472a.37.37%200%200%200-.287-.364l-4.117-1.092z%22/%3E%3C/svg%3E');
}
diff --git a/src/background.js b/src/background.js
index f0d211cab..793c814bd 100644
--- a/src/background.js
+++ b/src/background.js
@@ -667,7 +667,7 @@ function handleGhosteryHub(name, message, callback) {
case 'SET_SETUP_SHOW_WARNING_OVERRIDE':
case 'SET_ANTI_TRACKING':
case 'SET_AD_BLOCK':
- case 'SET_SMART_BLOCK':
+ case 'SET_SMART_BROWSE':
case 'SET_HUMAN_WEB':
case 'SET_SETUP_COMPLETE': {
panelData.set(message);
@@ -1574,7 +1574,7 @@ function initializeVersioning() {
if (prevVersion[0] < 8) {
globals.JUST_UPGRADED_FROM_7 = true;
conf.is_expert = true;
- conf.enable_smart_block = false;
+ conf.enable_smart_browse = false;
}
// Check if the earliest version is < 8.4.2
diff --git a/src/classes/ConfData.js b/src/classes/ConfData.js
index 3a2e7df1b..5e63eceae 100644
--- a/src/classes/ConfData.js
+++ b/src/classes/ConfData.js
@@ -119,7 +119,7 @@ class ConfData {
_initProperty('enable_click2play_social', true);
_initProperty('enable_human_web', !IS_CLIQZ && !IS_FIREFOX);
_initProperty('enable_abtests', true);
- _initProperty('enable_smart_block', true);
+ _initProperty('enable_smart_browse', true);
_initProperty('expand_all_trackers', true);
_initProperty('hide_alert_trusted', false);
_initProperty('hub_layout', 'not_yet_set');
diff --git a/src/classes/Debugger.js b/src/classes/Debugger.js
index 64f204d07..236a5db5e 100644
--- a/src/classes/Debugger.js
+++ b/src/classes/Debugger.js
@@ -339,7 +339,7 @@ class Debugger {
[`${CSS_SUBHEADER}When called with...`, 'Returns...'],
['No argument', 'The whole config object'],
['A property key string', 'An object with just that property'],
- ['', "Example: ghostery.getConfData('enable_smart_block')"],
+ ['', "Example: ghostery.getConfData('enable_smart_browse')"],
['A property key regex', 'An object with all matching properties'],
['', 'Example: ghostery.getConfData(/setup_/)'],
['Anything else', 'The whole config object. Also returned if there are no matching results'],
diff --git a/src/classes/EventHandlers.js b/src/classes/EventHandlers.js
index ccba49597..d28d024d3 100644
--- a/src/classes/EventHandlers.js
+++ b/src/classes/EventHandlers.js
@@ -27,7 +27,7 @@ import globals from './Globals';
import latency from './Latency';
import panelData from './PanelData';
import Policy, { BLOCK_REASON_SS_UNBLOCKED, BLOCK_REASON_C2P_ALLOWED_THROUGH } from './Policy';
-import PolicySmartBlock from './PolicySmartBlock';
+import PolicySmartBrowse from './PolicySmartBrowse';
import PurpleBox from './PurpleBox';
import surrogatedb from './SurrogateDb';
import tabInfo from './TabInfo';
@@ -43,7 +43,7 @@ import * as utils from '../utils/utils';
*/
class EventHandlers {
constructor() {
- this.policySmartBlock = new PolicySmartBlock();
+ this.policySmartBrowse = new PolicySmartBrowse();
this.purplebox = new PurpleBox();
this._pageListeners = new Set();
@@ -368,7 +368,7 @@ class EventHandlers {
/* ** SMART BLOCKING - Privacy ** */
// block HTTP request on HTTPS page
- if (PolicySmartBlock.isInsecureRequest(tab_id, page_protocol, processed.scheme, processed.hostname)) {
+ if (PolicySmartBrowse.isInsecureRequest(tab_id, page_protocol, processed.scheme, processed.hostname)) {
return EventHandlers._blockHelper(eventMutable, tab_id, null, null, request_id, from_redirect, true);
}
@@ -389,7 +389,7 @@ class EventHandlers {
/* ** SMART BLOCKING - Breakage ** */
// allow first party trackers
- if (PolicySmartBlock.isFirstPartyRequest(tab_id, page_domain, processed.generalDomain)) {
+ if (PolicySmartBrowse.isFirstPartyRequest(tab_id, page_domain, processed.generalDomain)) {
return { cancel: false };
}
@@ -418,8 +418,8 @@ class EventHandlers {
};
}
- const smartBlocked = !block ? this.policySmartBlock.shouldBlock(app_id, cat_id, tab_id, page_url, eventMutable.type, eventMutable.timeStamp) : false;
- const smartUnblocked = block ? this.policySmartBlock.shouldUnblock(app_id, cat_id, tab_id, page_url, eventMutable.type) : false;
+ const smartBrowseBlocked = !block ? this.policySmartBrowse.shouldBlock(app_id, cat_id, tab_id, page_url, eventMutable.type, eventMutable.timeStamp) : false;
+ const smartBrowseUnblocked = block ? this.policySmartBrowse.shouldUnblock(app_id, cat_id, tab_id, page_url, eventMutable.type) : false;
// process the tracker asynchronously
// very important to block request processing as little as necessary
@@ -430,14 +430,14 @@ class EventHandlers {
type: eventMutable.type,
url: eventMutable.url,
block,
- smartBlocked,
+ smartBrowseBlocked,
tab_id,
from_frame: eventMutable.parentFrameId !== -1,
request_id
});
}, 1);
- if ((block && !smartUnblocked) || smartBlocked) {
+ if ((block && !smartBrowseUnblocked) || smartBrowseBlocked) {
return EventHandlers._blockHelper(eventMutable, tab_id, app_id, bug_id, request_id, fromRedirect);
}
@@ -592,14 +592,14 @@ class EventHandlers {
*/
_processBug(details) {
const {
- bug_id, app_id, type, url, block, smartBlocked, tab_id, request_id
+ bug_id, app_id, type, url, block, smartBrowseBlocked, tab_id, request_id
} = details;
const tab = tabInfo.getTabInfo(tab_id);
const allowedOnce = c2pDb.allowedOnce(details.tab_id, app_id);
let num_apps_old;
- log((block || smartBlocked ? 'Blocked' : 'Found'), type, url);
+ log((block || smartBrowseBlocked ? 'Blocked' : 'Found'), type, url);
log(`^^^ Pattern ID ${bug_id} on tab ID ${tab_id}`);
if (conf.show_alert) {
@@ -613,7 +613,7 @@ class EventHandlers {
// throttled in PanelData
panelData.updatePanelUI();
- if ((block || smartBlocked) && (conf.enable_click2play || conf.enable_click2playSocial) && !allowedOnce) {
+ if ((block || smartBrowseBlocked) && (conf.enable_click2play || conf.enable_click2playSocial) && !allowedOnce) {
buildC2P(details, app_id);
}
diff --git a/src/classes/Globals.js b/src/classes/Globals.js
index d6d28fae8..14d1b101b 100644
--- a/src/classes/Globals.js
+++ b/src/classes/Globals.js
@@ -106,7 +106,7 @@ class Globals {
'enable_metrics',
'enable_offers',
'enable_abtests',
- 'enable_smart_block',
+ 'enable_smart_browse',
'expand_all_trackers',
'hide_alert_trusted',
'ignore_first_party',
diff --git a/src/classes/Metrics.js b/src/classes/Metrics.js
index 74929a9c8..c385956c2 100644
--- a/src/classes/Metrics.js
+++ b/src/classes/Metrics.js
@@ -133,8 +133,8 @@ class Metrics {
case 'create_account_setup':
case 'list_dash':
case 'pause_snooze':
- case 'smartblock_off':
- case 'smartblock_on':
+ case 'smartbrowse_off':
+ case 'smartbrowse_on':
case 'viewchange_from_detailed':
case 'viewchange_from_expanded':
case 'viewchange_from_simple':
@@ -282,7 +282,7 @@ class Metrics {
// Adblocking state
this._buildQueryPair('ab', conf.enable_ad_block ? '1' : '0') +
// Smartblocking state
- this._buildQueryPair('sm', conf.enable_smart_block ? '1' : '0') +
+ this._buildQueryPair('sm', conf.enable_smart_browse ? '1' : '0') +
// Antitracking state
this._buildQueryPair('at', conf.enable_anti_tracking ? '1' : '0') +
// The deepest setup page reached by user during setup
diff --git a/src/classes/PanelData.js b/src/classes/PanelData.js
index c47f542d1..c24eaa0aa 100644
--- a/src/classes/PanelData.js
+++ b/src/classes/PanelData.js
@@ -304,22 +304,22 @@ class PanelData {
};
}
- // TODO: Determine whether needsReload and/or smartBlock ever actually change!
+ // TODO: Determine whether needsReload and/or smartBrowse ever actually change!
/**
* Gets panel data that may change when a new tracker is found
* @param {number} tabId
- * @return {Object} new needsReload and smartBlock values from tabInfo
+ * @return {Object} new needsReload and smartBrowse values from tabInfo
*/
_getDynamicPanelData(tabId) {
const id = tabId || (this._activeTab && this._activeTab.id) || null;
- const { needsReload, smartBlock } =
+ const { needsReload, smartBrowse } =
tabInfo.getTabInfo(id) ||
- { needsReload: false, smartBlock: { blocked: {}, unblocked: {} } };
+ { needsReload: false, smartBrowse: { blocked: {}, unblocked: {} } };
return {
needsReload: needsReload || { changes: {} },
- smartBlock,
+ smartBrowse,
account: PanelData._getCurrentAccount(),
};
}
@@ -350,7 +350,7 @@ class PanelData {
const { id: tab_id } = this._activeTab;
const {
- current_theme, enable_ad_block, enable_anti_tracking, enable_smart_block,
+ current_theme, enable_ad_block, enable_anti_tracking, enable_smart_browse,
enable_offers, is_expanded, is_expert, language, reload_banner_status,
trackers_banner_status,
} = conf;
@@ -359,7 +359,7 @@ class PanelData {
current_theme,
enable_ad_block,
enable_anti_tracking,
- enable_smart_block,
+ enable_smart_browse,
enable_offers,
is_expanded,
is_expert,
@@ -473,7 +473,7 @@ class PanelData {
*/
static _getUserSettingsForPanelView(userSettings) {
const {
- current_theme, enable_ad_block, enable_anti_tracking, enable_smart_block,
+ current_theme, enable_ad_block, enable_anti_tracking, enable_smart_browse,
enable_offers, is_expanded, is_expert, reload_banner_status, trackers_banner_status,
} = userSettings;
@@ -481,7 +481,7 @@ class PanelData {
current_theme,
enable_ad_block,
enable_anti_tracking,
- enable_smart_block,
+ enable_smart_browse,
enable_offers,
is_expanded,
is_expert,
@@ -660,10 +660,10 @@ class PanelData {
if (!this._activeTab) { return []; }
const categories = {};
- const smartBlock = tabInfo.getTabInfo(this._activeTab.id, 'smartBlock');
+ const smartBrowse = tabInfo.getTabInfo(this._activeTab.id, 'smartBrowse');
this._trackerList.forEach((tracker) => {
- const trackerState = this._getTrackerState(tracker, smartBlock);
+ const trackerState = this._getTrackerState(tracker, smartBrowse);
let { cat } = tracker;
if (t(`category_${cat}`) === `category_${cat}`) {
@@ -676,7 +676,7 @@ class PanelData {
} else {
categories[cat] = PanelData._buildCategory(cat, trackerState);
}
- categories[cat].trackers.push(PanelData._buildTracker(tracker, trackerState, smartBlock));
+ categories[cat].trackers.push(PanelData._buildTracker(tracker, trackerState, smartBrowse));
});
const categoryArray = Object.values(categories);
@@ -726,10 +726,10 @@ class PanelData {
* @private
* @param {Object} tracker
* @param {Object} trackerState
- * @param {Object} smartBlock smart blocking stats for the active tab
+ * @param {Object} smartBrowse smart-browsing stats for the active tab
* @return {Object} object of tracker data
*/
- static _buildTracker(tracker, trackerState, smartBlock) {
+ static _buildTracker(tracker, trackerState, smartBrowse) {
const {
cat,
cliqzAdCount,
@@ -757,7 +757,7 @@ class PanelData {
warningCompatibility: hasCompatibilityIssue,
warningInsecure: hasInsecureIssue,
warningSlow: hasLatencyIssue,
- warningSmartBlock: (smartBlock.blocked.hasOwnProperty(id) && 'blocked') || (smartBlock.unblocked.hasOwnProperty(id) && 'unblocked') || false,
+ warningSmartBrowse: (smartBrowse.blocked.hasOwnProperty(id) && 'blocked') || (smartBrowse.unblocked.hasOwnProperty(id) && 'unblocked') || false,
cliqzAdCount,
cliqzCookieCount,
cliqzFingerprintCount,
@@ -769,14 +769,14 @@ class PanelData {
* Computes the various blocked/allowed states for a given tracker
* @private
* @param {Object} tracker
- * @param {Object} smartBlock
+ * @param {Object} smartBrowse
* @return {Object} the tracker's blocked/allowed states
*/
- _getTrackerState({ id: trackerId }, smartBlock) {
+ _getTrackerState({ id: trackerId }, smartBrowse) {
const { pageHost } = this._activeTab;
const {
selected_app_ids: selectedAppIds,
- enable_smart_block: smartBlockActive
+ enable_smart_browse: smartBrowseActive
} = conf;
const pageUnblocks = (pageHost && conf.site_specific_unblocks[pageHost]) || [];
const pageBlocks = (pageHost && conf.site_specific_blocks[pageHost]) || [];
@@ -785,8 +785,8 @@ class PanelData {
blocked: selectedAppIds.hasOwnProperty(trackerId),
ss_allowed: pageUnblocks.includes(+trackerId),
ss_blocked: pageBlocks.includes(+trackerId),
- sb_blocked: smartBlockActive && smartBlock.blocked.hasOwnProperty(`${trackerId}`),
- sb_allowed: smartBlockActive && smartBlock.unblocked.hasOwnProperty(`${trackerId}`)
+ sb_blocked: smartBrowseActive && smartBrowse.blocked.hasOwnProperty(`${trackerId}`),
+ sb_allowed: smartBrowseActive && smartBrowse.unblocked.hasOwnProperty(`${trackerId}`)
};
}
diff --git a/src/classes/PolicySmartBlock.js b/src/classes/PolicySmartBrowse.js
similarity index 84%
rename from src/classes/PolicySmartBlock.js
rename to src/classes/PolicySmartBrowse.js
index 76d1f8538..eafd76d75 100644
--- a/src/classes/PolicySmartBlock.js
+++ b/src/classes/PolicySmartBrowse.js
@@ -1,7 +1,7 @@
/**
- * Smart Blocking Policy Class
+ * Smart-Browsing Policy Class
*
- * Handles policy for Smart Blocking
+ * Handles policy for Smart-Browsing
*
* Ghostery Browser Extension
* https://www.ghostery.com/
@@ -21,11 +21,11 @@ import Policy from './Policy';
import c2pDb from './Click2PlayDb';
import { log } from '../utils/common';
/**
- * Class for handling Smart Blocking site policy.
+ * Class for handling Smart-Browsing site policy.
* @memberOf BackgroundClasses
* @todo make it a Singelton
*/
-class PolicySmartBlock {
+class PolicySmartBrowse {
constructor() {
this.allowedCategoriesList = [
'essential',
@@ -50,23 +50,23 @@ class PolicySmartBlock {
* applicable to this url, or none are met.
*/
shouldUnblock(appId, catId, tabId, pageURL, requestType) {
- if (!PolicySmartBlock.shouldCheck(tabId, appId)) { return false; }
+ if (!PolicySmartBrowse.shouldCheck(tabId, appId)) { return false; }
let reason;
- if (PolicySmartBlock._appHasKnownIssue(tabId, appId, pageURL)) {
+ if (PolicySmartBrowse._appHasKnownIssue(tabId, appId, pageURL)) {
reason = 'hasIssue'; // allow if tracker is in compatibility list
} else if (this._allowedCategories(tabId, appId, catId)) {
reason = 'allowedCategory'; // allow if tracker is in breaking category
} else if (this._allowedTypes(tabId, appId, requestType)) {
reason = 'allowedType'; // allow if tracker is in breaking type
- } else if (PolicySmartBlock._pageWasReloaded(tabId, appId)) {
+ } else if (PolicySmartBrowse._pageWasReloaded(tabId, appId)) {
reason = 'pageReloaded'; // allow if page has been reloaded recently
}
if (reason) {
- log('Smart Blocking unblocked appId', appId, 'for reason:', reason);
- tabInfo.setTabSmartBlockAppInfo(tabId, appId, reason, false);
+ log('Smart-Browsing unblocked appId', appId, 'for reason:', reason);
+ tabInfo.setTabSmartBrowseAppInfo(tabId, appId, reason, false);
return true;
}
@@ -84,37 +84,37 @@ class PolicySmartBlock {
* applicable to this url, or none are met.
*/
shouldBlock(appId, catId, tabId, pageURL, requestType, requestTimestamp) {
- if (!PolicySmartBlock.shouldCheck(tabId, appId)) { return false; }
+ if (!PolicySmartBrowse.shouldCheck(tabId, appId)) { return false; }
let reason;
// Block all trackers that load after 5 seconds from when page load started
- if (PolicySmartBlock._requestWasSlow(tabId, appId, requestTimestamp)) {
+ if (PolicySmartBrowse._requestWasSlow(tabId, appId, requestTimestamp)) {
reason = 'slow';
- if (PolicySmartBlock._appHasKnownIssue(tabId, appId, pageURL)) {
+ if (PolicySmartBrowse._appHasKnownIssue(tabId, appId, pageURL)) {
reason = 'hasIssue'; // allow if tracker is in compatibility list
} else if (this._allowedCategories(tabId, appId, catId)) {
reason = 'allowedCategory'; // allow if tracker is in breaking category
} else if (this._allowedTypes(tabId, appId, requestType)) {
reason = 'allowedType'; // allow if tracker is in breaking type
- } else if (PolicySmartBlock._pageWasReloaded(tabId, appId)) {
+ } else if (PolicySmartBrowse._pageWasReloaded(tabId, appId)) {
reason = 'pageReloaded'; // allow if page has been reloaded recently
}
}
const result = (reason === 'slow');
if (result) {
- log('Smart Blocking blocked appId', appId, 'for reason:', reason);
- tabInfo.setTabSmartBlockAppInfo(tabId, appId, 'slow', true);
+ log('Smart-Browsing blocked appId', appId, 'for reason:', reason);
+ tabInfo.setTabSmartBrowseAppInfo(tabId, appId, 'slow', true);
}
return result;
}
/**
- * Check if Smart Block should proceed based on:
- * 1. Smart Block is enabled
+ * Check if Smart-Browse should proceed based on:
+ * 1. Smart-Browse is enabled
* 2. Paused blocking is disabled
* 3. Page is neither whitelisted or blacklisted
* 4. Tracker is not site-specific unblocked
@@ -130,7 +130,7 @@ class PolicySmartBlock {
const tabHost = tabInfo.getTabInfo(tabId, 'host');
return (
- conf.enable_smart_block &&
+ conf.enable_smart_browse &&
!globals.SESSION.paused_blocking &&
!Policy.getSitePolicy(tabUrl) &&
((appId && (!conf.site_specific_unblocks.hasOwnProperty(tabHost) || !conf.site_specific_unblocks[tabHost].includes(+appId))) || appId === false) &&
@@ -147,7 +147,7 @@ class PolicySmartBlock {
* @return {boolean}
*/
static isFirstPartyRequest(tabId, pageDomain = '', requestDomain = '') {
- if (!PolicySmartBlock.shouldCheck(tabId)) { return false; }
+ if (!PolicySmartBrowse.shouldCheck(tabId)) { return false; }
return pageDomain === requestDomain;
}
@@ -181,7 +181,7 @@ class PolicySmartBlock {
* @return {boolean}
*/
static isInsecureRequest(tabId, pageProtocol, requestProtocol, requestHost) {
- if (!PolicySmartBlock.shouldCheck(tabId)) { return false; }
+ if (!PolicySmartBrowse.shouldCheck(tabId)) { return false; }
// don't block mixed content from localhost
if (requestHost === 'localhost' || requestHost === '127.0.0.1' || requestHost === '[::1]') {
@@ -222,13 +222,13 @@ class PolicySmartBlock {
* @return {boolean}
*/
static checkReloadThreshold(tabId) {
- if (!PolicySmartBlock.shouldCheck(tabId)) { return false; }
+ if (!PolicySmartBrowse.shouldCheck(tabId)) { return false; }
- const SMART_BLOCK_BEHAVIOR_THRESHOLD = 30000; // 30 seconds
+ const SMART_BROWSE_BEHAVIOR_THRESHOLD = 30000; // 30 seconds
return (
tabInfo.getTabInfoPersist(tabId, 'numOfReloads') > 1 &&
- (((Date.now() - tabInfo.getTabInfoPersist(tabId, 'firstLoadTimestamp')) < SMART_BLOCK_BEHAVIOR_THRESHOLD) || false)
+ (((Date.now() - tabInfo.getTabInfoPersist(tabId, 'firstLoadTimestamp')) < SMART_BROWSE_BEHAVIOR_THRESHOLD) || false)
);
}
@@ -247,4 +247,4 @@ class PolicySmartBlock {
}
}
-export default PolicySmartBlock;
+export default PolicySmartBrowse;
diff --git a/src/classes/TabInfo.js b/src/classes/TabInfo.js
index 24731c7fb..948349f38 100644
--- a/src/classes/TabInfo.js
+++ b/src/classes/TabInfo.js
@@ -15,7 +15,7 @@
* prefetched: {boolean} indicates that the tab was prefetched and not part of the main window
* purplebox: {boolean} indicates that the purplebox.js script has been loaded on this tab
* protocol: {string} request protocol
- * smartBlock: {Object} smart blocking stats for this tab
+ * smartBrowse: {Object} smart-browsing stats for this tab
* url: {string} full url
* }
*
@@ -29,7 +29,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0
*/
-import PolicySmartBlock from './PolicySmartBlock';
+import PolicySmartBrowse from './PolicySmartBrowse';
import { processUrl } from '../utils/utils';
/**
@@ -58,12 +58,12 @@ class TabInfo {
purplebox: false,
rewards: false,
timestamp: Date.now(),
- // assign only when smartBlock is enabled so avoid false positives
- // when enabling smartBlock is enabled for the first time
- firstLoadTimestamp: PolicySmartBlock.shouldCheck(tab_id) && (numOfReloads === 0 ? Date.now() : ((this.getTabInfoPersist(tab_id, 'firstLoadTimestamp') || 0)) || 0),
- reloaded: PolicySmartBlock.checkReloadThreshold(tab_id),
+ // assign only when smartBrowse is enabled so avoid false positives
+ // when enabling smartBrowse is enabled for the first time
+ firstLoadTimestamp: PolicySmartBrowse.shouldCheck(tab_id) && (numOfReloads === 0 ? Date.now() : ((this.getTabInfoPersist(tab_id, 'firstLoadTimestamp') || 0)) || 0),
+ reloaded: PolicySmartBrowse.checkReloadThreshold(tab_id),
numOfReloads,
- smartBlock: {
+ smartBrowse: {
blocked: {},
unblocked: {},
},
@@ -125,24 +125,24 @@ class TabInfo {
this._tabInfo[tab_id][property] = value;
}
}
- }
+ }
/**
- * Set Smart Blocking counts for this tab
+ * Set Smart-Browsing counts for this tab
* @param {number} tabId tab id
* @param {number} appId tracker id
- * @param {string} rule smart blocking rule name
+ * @param {string} rule smart-browsing rule name
* @param {boolean} blocked kind of policy to set
*/
- setTabSmartBlockAppInfo(tabId, appId, rule, blocked) {
+ setTabSmartBrowseAppInfo(tabId, appId, rule, blocked) {
if (!this._tabInfo.hasOwnProperty(tabId)) { return; }
const policy = blocked ? 'blocked' : 'unblocked';
- if (typeof this._tabInfo[tabId].smartBlock[policy][appId] === 'undefined') {
- this._tabInfo[tabId].smartBlock[policy][appId] = [];
+ if (typeof this._tabInfo[tabId].smartBrowse[policy][appId] === 'undefined') {
+ this._tabInfo[tabId].smartBrowse[policy][appId] = [];
}
- if (this._tabInfo[tabId].smartBlock[policy][appId].indexOf(rule) === -1) {
- this._tabInfo[tabId].smartBlock[policy][appId].push(rule);
+ if (this._tabInfo[tabId].smartBrowse[policy][appId].indexOf(rule) === -1) {
+ this._tabInfo[tabId].smartBrowse[policy][appId].push(rule);
}
}
diff --git a/test/src/PolicySmartBlock.test.js b/test/src/PolicySmartBlock.test.js
deleted file mode 100644
index fcaca99b8..000000000
--- a/test/src/PolicySmartBlock.test.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * PolicySmartBlock.js Unit Tests
- *
- * Ghostery Browser Extension
- * http://www.ghostery.com/
- *
- * Copyright 2020 Ghostery, Inc. All rights reserved.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0
- */
-
-import PolicySmartBlock from '../../src/classes/PolicySmartBlock';
-import { processUrl } from '../../src/utils/utils';
-
-let policySmartBlock = new PolicySmartBlock();
-
-// Mock imports for dependencies
-jest.mock('../../src/classes/TabInfo', () => {});
-
-describe('src/classes/PolicySmartBlock.js', () => {
- describe('PolicySmartBlock constructor tests', () => {
- test('allowedCategoriesList is constructed correctly', () => {
- const allowedCategoriesList = [
- 'essential',
- 'audio_video_player',
- 'comments',
- ];
- return expect(policySmartBlock.allowedCategoriesList).toEqual(allowedCategoriesList);
- });
- test('allowedTypesList is constructed correctly', () => {
- const allowedTypesList = [
- 'stylesheet',
- 'image',
- 'font',
- ];
- return expect(policySmartBlock.allowedTypesList).toEqual(allowedTypesList);
- });
- });
-
- describe('PolicySmartBlock isFirstPartyRequest tests', () => {
- beforeAll(() => {
- PolicySmartBlock.shouldCheck = jest.fn(() => true);
- });
-
- afterAll(() => {
- policySmartBlock.mockClear();
- });
-
- test('PolicySmartBlock isFirstPartyRequest truthy assertion', () => {
- expect(PolicySmartBlock.isFirstPartyRequest('tabId', 'example.com', 'example.com')).toBeTruthy();
- // isFirstPartyRequest() expects pre-parsed domains, so we should parse the test urls
- const parsedPage = processUrl('https://checkout.ghostery.com/insights');
- const parsedRequest = processUrl('https://analytics.ghostery.com/piwik.js');
- expect(PolicySmartBlock.isFirstPartyRequest('tabId', parsedPage.generalDomain, parsedRequest.generalDomain)).toBeTruthy();
- });
-
- test('PolicySmartBlock isFirstPartyRequest falsy assertion', () => {
- expect(PolicySmartBlock.isFirstPartyRequest('tabId', 'www.example.com', 'example.com')).toBeFalsy();
- expect(PolicySmartBlock.isFirstPartyRequest('tabId', 'sub.example.com', 'example.com')).toBeFalsy();
- expect(PolicySmartBlock.isFirstPartyRequest('tabId', 'example.com', 'test.com')).toBeFalsy();
- expect(PolicySmartBlock.isFirstPartyRequest('tabId', 'www.example.com', 'www.test.com')).toBeFalsy();
- });
- });
-});
diff --git a/test/src/PolicySmartBrowse.test.js b/test/src/PolicySmartBrowse.test.js
new file mode 100644
index 000000000..347d46ff9
--- /dev/null
+++ b/test/src/PolicySmartBrowse.test.js
@@ -0,0 +1,66 @@
+/**
+ * PolicySmartBrowse.js Unit Tests
+ *
+ * Ghostery Browser Extension
+ * http://www.ghostery.com/
+ *
+ * Copyright 2020 Ghostery, Inc. All rights reserved.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0
+ */
+
+import PolicySmartBrowse from '../../src/classes/PolicySmartBrowse';
+import { processUrl } from '../../src/utils/utils';
+
+let policySmartBrowse = new PolicySmartBrowse();
+
+// Mock imports for dependencies
+jest.mock('../../src/classes/TabInfo', () => {});
+
+describe('src/classes/PolicySmartBrowse.js', () => {
+ describe('PolicySmartBrowse constructor tests', () => {
+ test('allowedCategoriesList is constructed correctly', () => {
+ const allowedCategoriesList = [
+ 'essential',
+ 'audio_video_player',
+ 'comments',
+ ];
+ return expect(policySmartBrowse.allowedCategoriesList).toEqual(allowedCategoriesList);
+ });
+ test('allowedTypesList is constructed correctly', () => {
+ const allowedTypesList = [
+ 'stylesheet',
+ 'image',
+ 'font',
+ ];
+ return expect(policySmartBrowse.allowedTypesList).toEqual(allowedTypesList);
+ });
+ });
+
+ describe('PolicySmartBrowse isFirstPartyRequest tests', () => {
+ beforeAll(() => {
+ PolicySmartBrowse.shouldCheck = jest.fn(() => true);
+ });
+
+ afterAll(() => {
+ policySmartBrowse.mockClear();
+ });
+
+ test('PolicySmartBrowse isFirstPartyRequest truthy assertion', () => {
+ expect(PolicySmartBrowse.isFirstPartyRequest('tabId', 'example.com', 'example.com')).toBeTruthy();
+ // isFirstPartyRequest() expects pre-parsed domains, so we should parse the test urls
+ const parsedPage = processUrl('https://checkout.ghostery.com/insights');
+ const parsedRequest = processUrl('https://analytics.ghostery.com/piwik.js');
+ expect(PolicySmartBrowse.isFirstPartyRequest('tabId', parsedPage.generalDomain, parsedRequest.generalDomain)).toBeTruthy();
+ });
+
+ test('PolicySmartBrowse isFirstPartyRequest falsy assertion', () => {
+ expect(PolicySmartBrowse.isFirstPartyRequest('tabId', 'www.example.com', 'example.com')).toBeFalsy();
+ expect(PolicySmartBrowse.isFirstPartyRequest('tabId', 'sub.example.com', 'example.com')).toBeFalsy();
+ expect(PolicySmartBrowse.isFirstPartyRequest('tabId', 'example.com', 'test.com')).toBeFalsy();
+ expect(PolicySmartBrowse.isFirstPartyRequest('tabId', 'www.example.com', 'www.test.com')).toBeFalsy();
+ });
+ });
+});