From de4e15cd445f2659165676e524a99f3c0f42033c Mon Sep 17 00:00:00 2001
From: Soren Stoutner
Privacy Browser has three additional blocklists. - UltraList and UltraPrivacy - block ads and trackers that EasyList and EasyPrivacy do not. The third blocks all third-party requests. +
Privacy Browser'a 3 yeni engel listesi eklendi.
+ UltraList ve UltraPrivacy,
+ EasyList ve EasyPrivacy'nin engellemediÄi reklamları ve izleyicileri de engeller. Ãçüncü liste ise tüm üçüncü taraf istekleri engeller.
Bir istek yalnızca, isteÄin temel domaini baÄlantının temel domaininden farklıysa üçüncü taraf olarak kabul edilir.
ÃrneÄin, www.website.com
adresi images.website.com
adresinden bir resim yüklüyorsa,
her ikisi de aynı temel domaini (website.com
) paylaÅtıÄı için bu üçüncü taraf isteÄi olarak engellenmez.
diff --git a/app/src/main/assets/tr/guide_requests_light.html b/app/src/main/assets/tr/guide_requests_light.html
index 3039f39c..0331c508 100644
--- a/app/src/main/assets/tr/guide_requests_light.html
+++ b/app/src/main/assets/tr/guide_requests_light.html
@@ -71,9 +71,9 @@
Bu durum, bazen, kaynakların orijinal girdi tarafından amaçlanmayan Åekillerde izin verildiÄi veya engellendiÄi yanlıŠpozitif (false positive) durumuna yol açabilir.
Engel listesi girdilerinin nasıl iÅlendiÄine dair daha ayrıntılı bir açıklama stoutner.com adresinde bulunabilir.
Privacy Browser has three additional blocklists. - UltraList and UltraPrivacy - block ads and trackers that EasyList and EasyPrivacy do not. The third blocks all third-party requests. +
Privacy Browser'a 3 yeni engel listesi eklendi.
+ UltraList ve UltraPrivacy,
+ EasyList ve EasyPrivacy'nin engellemediÄi reklamları ve izleyicileri de engeller. Ãçüncü liste ise tüm üçüncü taraf istekleri engeller.
Bir istek yalnızca, isteÄin temel domaini baÄlantının temel domaininden farklıysa üçüncü taraf olarak kabul edilir.
ÃrneÄin, www.website.com
adresi images.website.com
adresinden bir resim yüklüyorsa,
her ikisi de aynı temel domaini (website.com
) paylaÅtıÄı için bu üçüncü taraf isteÄi olarak engellenmez.
diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java
index 097c8af9..d13c4d27 100644
--- a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java
+++ b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java
@@ -3591,6 +3591,9 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
// Store a copy of the current user agent to track changes for the return boolean.
String initialUserAgent = nestedScrollWebView.getSettings().getUserAgentString();
+ // Store the current URL.
+ nestedScrollWebView.setCurrentUrl(url);
+
// Parse the URL into a URI.
Uri uri = Uri.parse(url);
@@ -5344,6 +5347,12 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
// Check requests against the block lists. The deprecated `shouldInterceptRequest()` must be used until minimum API >= 21.
@Override
public WebResourceResponse shouldInterceptRequest(WebView view, String url) {
+ // Check to see if the resource request is for the main URL.
+ if (url.equals(nestedScrollWebView.getCurrentUrl())) {
+ // `return null` loads the resource request, which should never be blocked if it is the main URL.
+ return null;
+ }
+
// Wait until the blocklists have been populated. When Privacy Browser is being resumed after having the process killed in the background it will try to load the URLs immediately.
while (ultraPrivacy == null) {
// The wait must be synchronized, which only lets one thread run on it at a time, or `java.lang.IllegalMonitorStateException` is thrown.
diff --git a/app/src/main/java/com/stoutner/privacybrowser/views/NestedScrollWebView.java b/app/src/main/java/com/stoutner/privacybrowser/views/NestedScrollWebView.java
index c7a22278..c7122cb8 100644
--- a/app/src/main/java/com/stoutner/privacybrowser/views/NestedScrollWebView.java
+++ b/app/src/main/java/com/stoutner/privacybrowser/views/NestedScrollWebView.java
@@ -65,6 +65,9 @@ public class NestedScrollWebView extends WebView implements NestedScrollingChild
private boolean domainSettingsApplied;
private int domainSettingsDatabaseId;
+ // Keep track of the current URL. This is used to not block resource requests to the main URL.
+ private String currentUrl;
+
// Keep track of when the domain name changes so that domain settings can be reapplied. This should never be null.
private String currentDomainName = "";
@@ -230,6 +233,18 @@ public class NestedScrollWebView extends WebView implements NestedScrollingChild
}
+ // Current URL.
+ public void setCurrentUrl(String url) {
+ // Store the current URL.
+ currentUrl = url;
+ }
+
+ public String getCurrentUrl() {
+ // Return the current URL.
+ return currentUrl;
+ }
+
+
// Current domain name. To function well when called, the domain name should never be allowed to be null.
public void setCurrentDomainName(@NonNull String domainName) {
// Store the current domain name.
diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml
index a429ebbe..219ecd2e 100644
--- a/app/src/main/res/values-tr/strings.xml
+++ b/app/src/main/res/values-tr/strings.xml
@@ -48,12 +48,14 @@