<w>fanboy</w>
<w>fanboys</w>
<w>favoriteicon</w>
+ <w>fbclid</w>
<w>fbee</w>
<w>fdfilter</w>
<w>fdid</w>
// The URL sanitizers are set in `applyAppSettings()` and used in `sanitizeUrl()`.
private boolean sanitizeGoogleAnalytics;
+ private boolean sanitizeFacebookClickIds;
// The download strings are used in `onCreate()`, `onRequestPermissionResult()` and `initializeWebView()`.
private String downloadUrl;
incognitoModeEnabled = sharedPreferences.getBoolean("incognito_mode", false);
boolean doNotTrackEnabled = sharedPreferences.getBoolean("do_not_track", false);
sanitizeGoogleAnalytics = sharedPreferences.getBoolean("google_analytics", true);
+ sanitizeFacebookClickIds = sharedPreferences.getBoolean("facebook_click_ids", true);
proxyThroughOrbot = sharedPreferences.getBoolean("proxy_through_orbot", false);
fullScreenBrowsingModeEnabled = sharedPreferences.getBoolean("full_screen_browsing_mode", false);
hideAppBar = sharedPreferences.getBoolean("hide_app_bar", true);
}
}
+ // Sanitize Facebook Click IDs.
+ if (sanitizeFacebookClickIds) {
+ // Remove `?fbclid=`.
+ if (url.contains("?fbclid=")) {
+ url = url.substring(0, url.indexOf("?fbclid="));
+ }
+
+ // Remove &fbclid=`.
+ if (url.contains("&fbclid=")) {
+ url = url.substring(0, url.indexOf("&fbclid="));
+ }
+ }
+
// Return the sanitized URL.
return url;
}
Preference ultraPrivacyPreference = findPreference("ultraprivacy");
Preference blockAllThirdPartyRequestsPreference = findPreference("block_all_third_party_requests");
Preference googleAnalyticsPreference = findPreference("google_analytics");
+ Preference facebookClickIdsPreference = findPreference("facebook_click_ids");
Preference proxyThroughOrbotPreference = findPreference("proxy_through_orbot");
Preference torHomepagePreference = findPreference("tor_homepage");
Preference torSearchPreference = findPreference("tor_search");
}
}
- // Set the Google Analytics icons according to the theme.
+ // Set the Google Analytics icon according to the theme.
if (savedPreferences.getBoolean("google_analytics", true)) {
if (darkTheme) {
googleAnalyticsPreference.setIcon(R.drawable.modify_url_enabled_dark);
}
}
+ // Set the Facebook Click IDs icon according to the theme.
+ if (savedPreferences.getBoolean("facebook_click_ids", true)) {
+ if (darkTheme) {
+ facebookClickIdsPreference.setIcon(R.drawable.modify_url_enabled_dark);
+ } else {
+ facebookClickIdsPreference.setIcon(R.drawable.modify_url_enabled_light);
+ }
+ } else {
+ if (darkTheme) {
+ facebookClickIdsPreference.setIcon(R.drawable.modify_url_disabled_dark);
+ } else {
+ facebookClickIdsPreference.setIcon(R.drawable.modify_url_disabled_light);
+ }
+ }
+
// Set the Tor icons according to the theme.
if (proxyThroughOrbot) { // Proxying is enabled.
if (darkTheme) {
}
break;
+ case "facebook_click_ids":
+ // Update the icon.
+ if (sharedPreferences.getBoolean("facebook_click_ids", true)) {
+ if (darkTheme) {
+ facebookClickIdsPreference.setIcon(R.drawable.modify_url_enabled_dark);
+ } else {
+ facebookClickIdsPreference.setIcon(R.drawable.modify_url_enabled_light);
+ }
+ } else {
+ if (darkTheme) {
+ facebookClickIdsPreference.setIcon(R.drawable.modify_url_disabled_dark);
+ } else {
+ facebookClickIdsPreference.setIcon(R.drawable.modify_url_disabled_light);
+ }
+ }
+ break;
+
case "proxy_through_orbot":
// Get current settings.
boolean currentProxyThroughOrbot = sharedPreferences.getBoolean("proxy_through_orbot", false);
<string name="url_modification">URL Modification</string>
<string name="google_analytics">Google Analytics</string>
<string name="google_analytics_summary">Remove “?utm_” or “&utm_” and anything after it from URLs.</string>
+ <string name="facebook_click_ids">Facebook Click IDs</string>
+ <string name="facebook_click_ids_summary">Remove “?fbclid=” or “&fbclid=” and anything after it from URLs.</string>
<string name="tor">Tor</string>
<string name="proxy_through_orbot">Proxy through Orbot</string>
<string name="proxy_through_orbot_summary">Proxy all web traffic through Orbot on localhost:8118.</string>
android:title="@string/google_analytics"
android:summary="@string/google_analytics_summary"
android:defaultValue="true" />
+
+ <SwitchPreference
+ android:key="facebook_click_ids"
+ android:title="@string/facebook_click_ids"
+ android:summary="@string/facebook_click_ids_summary"
+ android:defaultValue="true" />
</PreferenceCategory>
<PreferenceCategory