- })
- .show();
-
- // Consume the event.
- return true;
-
- case R.id.easylist:
- // Toggle the EasyList status.
- currentWebView.enableBlocklist(NestedScrollWebView.EASYLIST, !currentWebView.isBlocklistEnabled(NestedScrollWebView.EASYLIST));
-
- // Update the menu checkbox.
- menuItem.setChecked(currentWebView.isBlocklistEnabled(NestedScrollWebView.EASYLIST));
-
- // Reload the current WebView.
- currentWebView.reload();
-
- // Consume the event.
- return true;
-
- case R.id.easyprivacy:
- // Toggle the EasyPrivacy status.
- currentWebView.enableBlocklist(NestedScrollWebView.EASYPRIVACY, !currentWebView.isBlocklistEnabled(NestedScrollWebView.EASYPRIVACY));
-
- // Update the menu checkbox.
- menuItem.setChecked(currentWebView.isBlocklistEnabled(NestedScrollWebView.EASYPRIVACY));
-
- // Reload the current WebView.
- currentWebView.reload();
-
- // Consume the event.
- return true;
-
- case R.id.fanboys_annoyance_list:
- // Toggle Fanboy's Annoyance List status.
- currentWebView.enableBlocklist(NestedScrollWebView.FANBOYS_ANNOYANCE_LIST, !currentWebView.isBlocklistEnabled(NestedScrollWebView.FANBOYS_ANNOYANCE_LIST));
-
- // Update the menu checkbox.
- menuItem.setChecked(currentWebView.isBlocklistEnabled(NestedScrollWebView.FANBOYS_ANNOYANCE_LIST));
-
- // Update the staus of Fanboy's Social Blocking List.
- MenuItem fanboysSocialBlockingListMenuItem = optionsMenu.findItem(R.id.fanboys_social_blocking_list);
- fanboysSocialBlockingListMenuItem.setEnabled(!currentWebView.isBlocklistEnabled(NestedScrollWebView.FANBOYS_ANNOYANCE_LIST));
-
- // Reload the current WebView.
- currentWebView.reload();
-
- // Consume the event.
- return true;
-
- case R.id.fanboys_social_blocking_list:
- // Toggle Fanboy's Social Blocking List status.
- currentWebView.enableBlocklist(NestedScrollWebView.FANBOYS_SOCIAL_BLOCKING_LIST, !currentWebView.isBlocklistEnabled(NestedScrollWebView.FANBOYS_SOCIAL_BLOCKING_LIST));
-
- // Update the menu checkbox.
- menuItem.setChecked(currentWebView.isBlocklistEnabled(NestedScrollWebView.FANBOYS_SOCIAL_BLOCKING_LIST));
-
- // Reload the current WebView.
- currentWebView.reload();
-
- // Consume the event.
- return true;
-
- case R.id.ultralist:
- // Toggle the UltraList status.
- currentWebView.enableBlocklist(NestedScrollWebView.ULTRALIST, !currentWebView.isBlocklistEnabled(NestedScrollWebView.ULTRALIST));
-
- // Update the menu checkbox.
- menuItem.setChecked(currentWebView.isBlocklistEnabled(NestedScrollWebView.ULTRALIST));
-
- // Reload the current WebView.
- currentWebView.reload();
-
- // Consume the event.
- return true;
-
- case R.id.ultraprivacy:
- // Toggle the UltraPrivacy status.
- currentWebView.enableBlocklist(NestedScrollWebView.ULTRAPRIVACY, !currentWebView.isBlocklistEnabled(NestedScrollWebView.ULTRAPRIVACY));
-
- // Update the menu checkbox.
- menuItem.setChecked(currentWebView.isBlocklistEnabled(NestedScrollWebView.ULTRAPRIVACY));
-
- // Reload the current WebView.
- currentWebView.reload();
-
- // Consume the event.
- return true;
-
- case R.id.block_all_third_party_requests:
- //Toggle the third-party requests blocker status.
- currentWebView.enableBlocklist(NestedScrollWebView.THIRD_PARTY_REQUESTS, !currentWebView.isBlocklistEnabled(NestedScrollWebView.THIRD_PARTY_REQUESTS));
-
- // Update the menu checkbox.
- menuItem.setChecked(currentWebView.isBlocklistEnabled(NestedScrollWebView.THIRD_PARTY_REQUESTS));
-
- // Reload the current WebView.
- currentWebView.reload();
-
- // Consume the event.
- return true;
-
- case R.id.proxy_none:
- // Update the proxy mode.
- proxyMode = ProxyHelper.NONE;
-
- // Apply the proxy mode.
- applyProxy(true);
-
- // Consume the event.
- return true;
-
- case R.id.proxy_tor:
- // Update the proxy mode.
- proxyMode = ProxyHelper.TOR;
-
- // Apply the proxy mode.
- applyProxy(true);
-
- // Consume the event.
- return true;
-
- case R.id.proxy_i2p:
- // Update the proxy mode.
- proxyMode = ProxyHelper.I2P;
-
- // Apply the proxy mode.
- applyProxy(true);
-
- // Consume the event.
- return true;
-
- case R.id.proxy_custom:
- // Update the proxy mode.
- proxyMode = ProxyHelper.CUSTOM;
-
- // Apply the proxy mode.
- applyProxy(true);
-
- // Consume the event.
- return true;
-
- case R.id.user_agent_privacy_browser:
- // Update the user agent.
- currentWebView.getSettings().setUserAgentString(getResources().getStringArray(R.array.user_agent_data)[0]);
-
- // Reload the current WebView.
- currentWebView.reload();
-
- // Consume the event.
- return true;
-
- case R.id.user_agent_webview_default:
- // Update the user agent.
- currentWebView.getSettings().setUserAgentString("");
-
- // Reload the current WebView.
- currentWebView.reload();
-
- // Consume the event.
- return true;
-
- case R.id.user_agent_firefox_on_android:
- // Update the user agent.
- currentWebView.getSettings().setUserAgentString(getResources().getStringArray(R.array.user_agent_data)[2]);
-
- // Reload the current WebView.
- currentWebView.reload();
-
- // Consume the event.
- return true;
-
- case R.id.user_agent_chrome_on_android:
- // Update the user agent.
- currentWebView.getSettings().setUserAgentString(getResources().getStringArray(R.array.user_agent_data)[3]);
-
- // Reload the current WebView.
- currentWebView.reload();
-
- // Consume the event.
- return true;
-
- case R.id.user_agent_safari_on_ios:
- // Update the user agent.
- currentWebView.getSettings().setUserAgentString(getResources().getStringArray(R.array.user_agent_data)[4]);
-
- // Reload the current WebView.
- currentWebView.reload();
-
- // Consume the event.
- return true;
-
- case R.id.user_agent_firefox_on_linux:
- // Update the user agent.
- currentWebView.getSettings().setUserAgentString(getResources().getStringArray(R.array.user_agent_data)[5]);
-
- // Reload the current WebView.
- currentWebView.reload();
-
- // Consume the event.
- return true;
-
- case R.id.user_agent_chromium_on_linux:
- // Update the user agent.
- currentWebView.getSettings().setUserAgentString(getResources().getStringArray(R.array.user_agent_data)[6]);
-
- // Reload the current WebView.
- currentWebView.reload();
-
- // Consume the event.
- return true;