Skip to content

Commit 2d35fa0

Browse files
committed
Add AdGuard URL Tracking Filter; remove 'Complete' mode
Introduces the AdGuard URL Tracking Filter to the filter list for enhanced privacy by removing tracking parameters from URLs. Removes the 'Complete' blocking level and related UI/logic from OnboardingView to simplify options and avoid site breakage risks.
1 parent 61070dd commit 2d35fa0

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

wBlock/FilterListLoader.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ class FilterListLoader {
206206
FilterList(id: UUID(), name: "YousList", url: URL(string: "https://raw.githubusercontent.com/yous/YousList/master/youslist.txt")!, category: .foreign, description: "Filter that blocks ads on Korean sites.", languages: ["ko"], trustLevel: "high"),
207207
])
208208
filterLists.append(FilterList(id: UUID(), name: "EasyPrivacy", url: URL(string: "https://raw.githubusercontent.com/AdguardTeam/FiltersRegistry/master/platforms/extension/safari/filters/118_optimized.txt")!, category: FilterListCategory.privacy, isSelected: true, description: "Blocks tracking scripts, web beacons, and other privacy-invasive elements."))
209+
filterLists.append(FilterList(id: UUID(), name: "AdGuard URL Tracking Filter", url: URL(string: "https://raw.githubusercontent.com/AdguardTeam/FiltersRegistry/master/filters/filter_17_TrackParam/filter.txt")!, category: FilterListCategory.privacy, isSelected: false, description: "Removes tracking parameters from URLs (utm_source, fbclid, gclid, etc.) to enhance privacy."))
209210

210211
#if os(iOS)
211212
filterLists.append(FilterList(id: UUID(), name: "AdGuard Mobile Filter", url: URL(string: "https://raw.githubusercontent.com/AdguardTeam/FiltersRegistry/master/filters/filter_11_Mobile/filter.txt")!, category: FilterListCategory.multipurpose, isSelected: true, description: "Optimized for mobile ad blocking. Recommended for iOS/iPadOS."))
@@ -223,6 +224,7 @@ class FilterListLoader {
223224
"AdGuard Base Filter",
224225
"AdGuard Tracking Protection Filter",
225226
"EasyPrivacy",
227+
"AdGuard URL Tracking Filter",
226228
"Online Malicious URL Blocklist",
227229
"d3Host List by d3ward",
228230
"AdGuard Annoyances Filter",
@@ -233,6 +235,7 @@ class FilterListLoader {
233235
"AdGuard Base Filter",
234236
"AdGuard Tracking Protection Filter",
235237
"EasyPrivacy",
238+
"AdGuard URL Tracking Filter",
236239
"Online Malicious URL Blocklist",
237240
"d3Host List by d3ward",
238241
"AdGuard Annoyances Filter",

wBlock/OnboardingView.swift

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ struct OnboardingView: View {
88
enum BlockingLevel: String, CaseIterable, Identifiable {
99
case minimal = "Minimal"
1010
case recommended = "Recommended"
11-
case complete = "Complete"
1211
var id: String { rawValue }
1312
}
1413

@@ -370,8 +369,6 @@ struct OnboardingView: View {
370369
}
371370
}
372371
.buttonStyle(.plain)
373-
.disabled(level == .complete)
374-
.opacity(level == .complete ? 0.5 : 1.0)
375372
}
376373
Spacer()
377374
HStack {
@@ -388,8 +385,6 @@ struct OnboardingView: View {
388385
return "Only AdGuard Base filter. Lightest protection, best compatibility."
389386
case .recommended:
390387
return "Default filters for balanced blocking and compatibility."
391-
case .complete:
392-
return "All filters (except foreign languages). May break some sites, so it is not recommended. Use with caution."
393388
}
394389
}
395390

@@ -560,11 +555,6 @@ struct OnboardingView: View {
560555
Text("Regional filters: \(selectedRegionalFilterNames.isEmpty ? "None" : selectedRegionalFilterNames.joined(separator: ", "))")
561556
Text("Userscripts: \(selectedUserscripts.isEmpty ? "None" : selectedUserscripts.compactMap { id in defaultUserScripts.first(where: { $0.id == id })?.name }.joined(separator: ", "))")
562557
Divider()
563-
if selectedBlockingLevel == BlockingLevel.complete.rawValue {
564-
Text("Warning: Complete mode may break some websites. Proceed with caution.")
565-
.foregroundColor(.red)
566-
.font(.caption)
567-
}
568558

569559
// Safari extension enablement reminder
570560
VStack(alignment: .leading, spacing: 8) {
@@ -629,6 +619,7 @@ struct OnboardingView: View {
629619
"AdGuard Tracking Protection Filter",
630620
"AdGuard Annoyances Filter",
631621
"EasyPrivacy",
622+
"AdGuard URL Tracking Filter",
632623
"Online Malicious URL Blocklist",
633624
"d3Host List by d3ward",
634625
"Anti-Adblock List"
@@ -638,10 +629,6 @@ struct OnboardingView: View {
638629
updatedFilters[i].isSelected = true
639630
}
640631
}
641-
case .complete:
642-
for i in updatedFilters.indices {
643-
updatedFilters[i].isSelected = updatedFilters[i].category != .foreign
644-
}
645632
}
646633
// If Bypass Paywalls userscript is selected, also enable the required filter list
647634
if let bypassScript = bypassPaywallsScript, selectedUserscripts.contains(bypassScript.id), let filterName = bypassPaywallsFilterName {

0 commit comments

Comments
 (0)