}
}
});
+
+ // Show the Snackbar.
undoDeleteSnackbar.show();
break;
}
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
// Store the values from the shared preferences in variables.
- String homepageString = sharedPreferences.getString("homepage", "https://start.duckduckgo.com");
- String torHomepageString = sharedPreferences.getString("tor_homepage", "https://3g2upl4pq6kufc4m.onion");
- String torSearchString = sharedPreferences.getString("tor_search", "https://3g2upl4pq6kufc4m.onion/html/?q=");
+ String homepageString = sharedPreferences.getString("homepage", "https://searx.me/");
+ String torHomepageString = sharedPreferences.getString("tor_homepage", "http://ulrn6sryqaifefld.onion/");
+ String torSearchString = sharedPreferences.getString("tor_search", "http://ulrn6sryqaifefld.onion/?q=");
String torSearchCustomURLString = sharedPreferences.getString("tor_search_custom_url", "");
- String searchString = sharedPreferences.getString("search", "https://duckduckgo.com/html/?q=");
+ String searchString = sharedPreferences.getString("search", "https://searx.me/?q=");
String searchCustomURLString = sharedPreferences.getString("search_custom_url", "");
incognitoModeEnabled = sharedPreferences.getBoolean("incognito_mode", false);
boolean doNotTrackEnabled = sharedPreferences.getBoolean("do_not_track", false);
Bundle argumentsBundle = new Bundle();
argumentsBundle.putInt(DomainSettingsFragment.DATABASE_ID, DomainsActivity.currentDomainDatabaseId);
- // Add `argumentsBundle` to `domainSettingsFragment`.
+ // Add the arguments bundle to the domain settings fragment.
DomainSettingsFragment domainSettingsFragment = new DomainSettingsFragment();
domainSettingsFragment.setArguments(argumentsBundle);
if (DomainsActivity.twoPanedMode) { // The device in in two-paned mode.
// enable `deleteMenuItem` if the system is not waiting for a `Snackbar` to be dismissed.
if (!DomainsActivity.dismissingSnackbar) {
- // Enable `deleteMenuItem`.
+ // Enable the delete menu item.
DomainsActivity.deleteMenuItem.setEnabled(true);
// Set the delete icon according to the theme.
}
}
- // Display `domainSettingsFragment`.
+ // Display the domain settings fragment.
supportFragmentManager.beginTransaction().replace(R.id.domain_settings_fragment_container, domainSettingsFragment).commit();
} else { // The device in in single-paned mode
// Show `deleteMenuItem` if the system is not waiting for a `Snackbar` to be dismissed.
DomainsActivity.deleteMenuItem.setVisible(true);
}
- // Hide `add_domain_fab`.
+ // Hide the add domain FAB.
FloatingActionButton addDomainFAB = getActivity().findViewById(R.id.add_domain_fab);
addDomainFAB.setVisibility(View.GONE);
- // Display `domainSettingsFragment`.
+ // Display the domain settings fragment.
supportFragmentManager.beginTransaction().replace(R.id.domains_listview_fragment_container, domainSettingsFragment).commit();
}
});
hideSystemBarsPreference.setDependency("full_screen_browsing_mode");
// Get Strings from the preferences.
- String torSearchString = savedPreferences.getString("tor_search", "https://3g2upl4pq6kufc4m.onion/html/?q=");
- String searchString = savedPreferences.getString("search", "https://duckduckgo.com/html/?q=");
+ String torSearchString = savedPreferences.getString("tor_search", "http://ulrn6sryqaifefld.onion/?q=");
+ String searchString = savedPreferences.getString("search", "https://searx.me/?q=");
// Get booleans that are used in multiple places from the preferences.
final boolean javaScriptEnabled = savedPreferences.getBoolean("javascript_enabled", false);
customUserAgentPreference.setEnabled(userAgentPreference.getSummary().equals(getString(R.string.custom_user_agent)));
- // Set the Tor homepage URL as the summary text for the `tor_homepage` preference when the preference screen is loaded. The default is DuckDuckGo: `https://3g2upl4pq6kufc4m.onion`.
- torHomepagePreference.setSummary(savedPreferences.getString("tor_homepage", "https://3g2upl4pq6kufc4m.onion"));
+ // Set the Tor homepage URL as the summary text for the `tor_homepage` preference when the preference screen is loaded. The default is Searx: `http://ulrn6sryqaifefld.onion/`.
+ torHomepagePreference.setSummary(savedPreferences.getString("tor_homepage", "http://ulrn6sryqaifefld.onion/"));
- // Set the Tor search URL as the summary text for the Tor preference when the preference screen is loaded. The default is `https://3g2upl4pq6kufc4m.onion/html/?q=`
+ // Set the Tor search URL as the summary text for the Tor preference when the preference screen is loaded.
if (torSearchString.equals("Custom URL")) {
// Use R.string.custom_url, which will be translated, instead of the array value, which will not.
torSearchPreference.setSummary(R.string.custom_url);
torSearchCustomURLPreference.setEnabled(proxyThroughOrbot && torSearchString.equals("Custom URL"));
- // Set the search URL as the summary text for the search preference when the preference screen is loaded. The default is `https://duckduckgo.com/html/?q=`.
+ // Set the search URL as the summary text for the search preference when the preference screen is loaded.
if (searchString.equals("Custom URL")) {
// Use R.string.custom_url, which will be translated, instead of the array value, which will not.
searchPreference.setSummary(R.string.custom_url);
clearCachePreference.setEnabled(!clearEverything);
// Set the homepage URL as the summary text for the homepage preference.
- homepagePreference.setSummary(savedPreferences.getString("homepage", "https://duckduckgo.com/?kao=-1&kak=-1"));
+ homepagePreference.setSummary(savedPreferences.getString("homepage", "https://searx.me/"));
// Set the default font size as the summary text for the preference.
defaultFontSizePreference.setSummary(savedPreferences.getString("default_font_size", "100") + "%%");
case "proxy_through_orbot":
// Get current settings.
boolean currentProxyThroughOrbot = sharedPreferences.getBoolean("proxy_through_orbot", false);
- String currentTorSearchString = sharedPreferences.getString("tor_search", "https://3g2upl4pq6kufc4m.onion/html/?q=");
+ String currentTorSearchString = sharedPreferences.getString("tor_search", "http://ulrn6sryqaifefld.onion/?q=");
// Enable the Tor custom URL search option only if `currentProxyThroughOrbot` is true and the search is set to `Custom URL`.
torSearchCustomURLPreference.setEnabled(currentProxyThroughOrbot && currentTorSearchString.equals("Custom URL"));
break;
case "tor_homepage":
- // Set the new tor homepage URL as the summary text for the `tor_homepage` preference. The default is DuckDuckGo: `https://3g2upl4pq6kufc4m.onion`.
- torHomepagePreference.setSummary(sharedPreferences.getString("tor_homepage", "https://3g2upl4pq6kufc4m.onion"));
+ // Set the new tor homepage URL as the summary text for the `tor_homepage` preference. The default is Searx: `http://ulrn6sryqaifefld.onion/`.
+ torHomepagePreference.setSummary(sharedPreferences.getString("tor_homepage", "http://ulrn6sryqaifefld.onion/"));
break;
case "tor_search":
// Get the present search string.
- String presentTorSearchString = sharedPreferences.getString("tor_search", "https://3g2upl4pq6kufc4m.onion/html/?q=");
+ String presentTorSearchString = sharedPreferences.getString("tor_search", "http://ulrn6sryqaifefld.onion/?q=");
// Update the preferences.
if (presentTorSearchString.equals("Custom URL")) {
case "search":
// Store the new search string.
- String newSearchString = sharedPreferences.getString("search", "https://duckduckgo.com/html/?q=");
+ String newSearchString = sharedPreferences.getString("search", "https://searx.me/?q=");
// Update `searchPreference` and `searchCustomURLPreference`.
if (newSearchString.equals("Custom URL")) { // `Custom URL` is selected.
break;
case "homepage":
- // Set the new homepage URL as the summary text for the Homepage preference. The default is `https://www.duckduckgo.com`.
- homepagePreference.setSummary(sharedPreferences.getString("homepage", "https://www.duckduckgo.com"));
+ // Set the new homepage URL as the summary text for the Homepage preference.
+ homepagePreference.setSummary(sharedPreferences.getString("homepage", "https://searx.me/"));
break;
case "default_font_size":
<string name="tor">Tor</string>
<string name="proxy_through_orbot">Proxy durch Orbot</string>
<string name="proxy_through_orbot_summary">Sämtlichen Web-Verkehr durch Orbot mittels localhost:8118 leiten.</string>
+ <string-array name="tor_search_entries">
+ <item>Searx</item>
+ <item>DuckDuckGo - JavaScript disabled</item>
+ <item>DuckDuckGo - JavaScript enabled</item>
+ <item>Eigene</item>
+ </string-array>
<string name="search">Suche</string>
<string-array name="search_entries">
+ <item>Searx</item>
+ <item>StartPage</item>
<item>DuckDuckGo - JavaScript disabled</item>
<item>DuckDuckGo - JavaScript enabled</item>
- <item>StartPage</item>
<item>Qwant - JavaScript disabled</item>
<item>Qwant - JavaScript enabled</item>
- <item>Searx</item>
<item>Google</item>
<item>Bing</item>
<item>Yahoo - JavaScript disabled</item>
<string name="tor_homepage">Página de inicio de Tor</string>
<string name="tor_search">Búsqueda en Tor</string>
<string-array name="tor_search_entries">
+ <item>Searx</item>
<item>DuckDuckGo - Javascript deshabilitado</item>
<item>DuckDuckGo - Javascript habilitado</item>
<item>Personalizado</item>
<string name="tor_search_custom_url">URL personalizada de búsqueda en Tor</string>
<string name="search">Búsqueda</string>
<string-array name="search_entries">
+ <item>Searx</item>
+ <item>StartPage</item>
<item>DuckDuckGo - Javascript deshabilitado</item>
<item>DuckDuckGo - Javascript habilitado</item>
- <item>StartPage</item>
<item>Qwant - Javascript deshatilitado</item>
<item>Qwant - Javascript habilitado</item>
- <item>Searx</item>
<item>Google</item>
<item>Bing</item>
<item>Yahoo - Javascript deshabilitado</item>
<string name="tor_homepage">Tor Homepage</string>
<string name="tor_search">Tor - Ricerca</string>
<string-array name="tor_search_entries">
+ <item>Searx</item>
<item>DuckDuckGo - JavaScript disabilitato</item>
<item>DuckDuckGo - JavaScript abilitato</item>
<item>Personalizzata</item>
<string name="tor_search_custom_url">Tor - Ricerca personalizzata</string>
<string name="search">Ricerca</string>
<string-array name="search_entries">
+ <item>Searx</item>
+ <item>StartPage</item>
<item>DuckDuckGo - JavaScript disabilitato</item>
<item>DuckDuckGo - JavaScript abilitato</item>
- <item>StartPage</item>
<item>Qwant - JavaScript disabilitato</item>
<item>Qwant - JavaScript abilitato</item>
- <item>Searx</item>
<item>Google</item>
<item>Bing</item>
<item>Yahoo - JavaScript disabilitato</item>
<string name="tor_homepage">Домашняя страница Tor</string>
<string name="tor_search">Поиск Tor</string>
<string-array name="tor_search_entries">
+ <item>Searx</item>
<item>DuckDuckGo - JavaScript выключен</item>
<item>DuckDuckGo - JavaScript включен</item>
<item>Настраиваемый</item>
<string name="tor_search_custom_url">Настраиваемый URL поиска Tor</string>
<string name="search">Поиск</string>
<string-array name="search_entries">
+ <item>Searx</item>
+ <item>StartPage</item>
<item>DuckDuckGo - JavaScript выключен</item>
<item>DuckDuckGo - JavaScript включен</item>
- <item>StartPage</item>
<item>Qwant - JavaScript выключен</item>
<item>Qwant - JavaScript включен</item>
- <item>Searx</item>
<item>Google</item>
<item>Bing</item>
<item>Yahoo - JavaScript выключен</item>
<string name="tor_homepage">Tor homepage</string>
<string name="tor_search">Tor search</string>
<string-array name="tor_search_entries">
+ <item>Searx</item>
<item>DuckDuckGo - JavaScript disabled</item>
<item>DuckDuckGo - JavaScript enabled</item>
<item>Custom</item>
</string-array>
<string-array name="tor_search_entry_values" translatable="false"> <!-- None of the items in this `string-array` should be translated. -->
+ <item>http://ulrn6sryqaifefld.onion/?q=</item>
<item>https://3g2upl4pq6kufc4m.onion/html/?q=</item>
<item>https://3g2upl4pq6kufc4m.onion/?q=</item>
<item>Custom URL</item><!-- This item must not be translated into other languages because it is referenced in code. It is never displayed on the screen. -->
<string name="tor_search_custom_url">Tor search custom URL</string>
<string name="search">Search</string>
<string-array name="search_entries">
+ <item>Searx</item>
+ <item>StartPage</item>
<item>DuckDuckGo - JavaScript disabled</item>
<item>DuckDuckGo - JavaScript enabled</item>
- <item>StartPage</item>
<item>Qwant - JavaScript disabled</item>
<item>Qwant - JavaScript enabled</item>
- <item>Searx</item>
<item>Google</item>
<item>Bing</item>
<item>Yahoo - JavaScript disabled</item>
<item>Custom</item>
</string-array>
<string-array name="search_entry_values" translatable="false"> <!-- None of the items in this `string-array` should be translated. -->
+ <item>https://searx.me/?q=</item>
+ <item>https://www.startpage.com/do/search?query=</item>
<item>https://duckduckgo.com/html/?q=</item>
<item>https://duckduckgo.com/?q=</item>
- <item>https://www.startpage.com/do/search?query=</item>
<item>https://lite.qwant.com/?q=</item>
<item>https://www.qwant.com/?q=</item>
- <item>https://searx.me/?q=</item>
<item>https://www.google.com/search?q=</item>
<item>https://www.bing.com/search?q=</item>
<item>https://search.yahoo.com/mobile/s?nojs=1&p=</item>
<EditTextPreference
android:key="tor_homepage"
android:title="@string/tor_homepage"
- android:defaultValue="https://3g2upl4pq6kufc4m.onion/"
+ android:defaultValue="http://ulrn6sryqaifefld.onion/"
android:inputType="textUri" />
<ListPreference
android:title="@string/tor_search"
android:entries="@array/tor_search_entries"
android:entryValues="@array/tor_search_entry_values"
- android:defaultValue="https://3g2upl4pq6kufc4m.onion/html/?q=" />
+ android:defaultValue="http://ulrn6sryqaifefld.onion/?q=" />
<!--suppress AndroidDomInspection -->
<!--`suppress AndroidDomInspection` removes the error about the default value being blank. -->
android:title="@string/search"
android:entries="@array/search_entries"
android:entryValues="@array/search_entry_values"
- android:defaultValue="https://duckduckgo.com/html/?q="
+ android:defaultValue="https://searx.me/?q="
android:icon="?attr/searchIcon" />
<!--suppress AndroidDomInspection -->
<EditTextPreference
android:key="homepage"
android:title="@string/homepage"
- android:defaultValue="https://duckduckgo.com/?kao=-1&kak=-1"
+ android:defaultValue="https://searx.me/"
android:inputType="textUri"
android:icon="?attr/homepageIcon" />