Index: src/org/adblockplus/android/AndroidWebRequest.java |
diff --git a/src/org/adblockplus/android/AndroidWebRequest.java b/src/org/adblockplus/android/AndroidWebRequest.java |
index ee52b368573dab336411d22c865afd3909f81356..215e5a18bde0354ec3c07c48e3770860465027e8 100644 |
--- a/src/org/adblockplus/android/AndroidWebRequest.java |
+++ b/src/org/adblockplus/android/AndroidWebRequest.java |
@@ -38,6 +38,17 @@ public class AndroidWebRequest extends WebRequest |
public final static String TAG = Utils.getTag(WebRequest.class); |
private final HashSet<String> subscriptionURLs = new HashSet<String>(); |
+ private final boolean elemhideEnabled; |
+ |
+ AndroidWebRequest(boolean enableElemhide) |
+ { |
+ this.elemhideEnabled = enableElemhide; |
+ } |
+ |
+ AndroidWebRequest() |
+ { |
+ this(false); |
+ } |
private boolean isListedSubscriptionUrl(final URL url) |
{ |
@@ -81,7 +92,7 @@ public class AndroidWebRequest extends WebRequest |
final BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(), "UTF-8")); |
final StringBuilder sb = new StringBuilder(); |
- if (isListedSubscriptionUrl(url)) |
+ if (!this.elemhideEnabled && isListedSubscriptionUrl(url)) |
{ |
Log.d(TAG, "Removing element hiding rules from: '" + url + "'"); |