Skip to content

Commit

Permalink
feat(youtube/general-ads): custom component filter
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Nov 19, 2022
1 parent 6272e4b commit 72a3cd0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,11 @@ public GeneralBytecodeAdsPatch() {
);
}

private final BlockRule custom = new CustomBlockRule(
SettingsEnum.ADREMOVER_CUSTOM_ENABLED,
SettingsEnum.ADREMOVER_CUSTOM_REMOVAL
);

public boolean filter(final String path, final String identifier) {
// Do not block on these
if (ReVancedUtils.containsAny(path,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public enum SettingsEnum {
ENABLE_WHITELIST("revanced_whitelist_ads_enabled", false, ReturnType.BOOLEAN),

// Ad settings
HOME_ADS_REMOVAL("revanced_home_ads_removal", true, ReturnType.BOOLEAN, true),
ADREMOVER_CUSTOM_ENABLED("revanced_adremover_custom_enabled", false, ReturnType.BOOLEAN),
ADREMOVER_CUSTOM_REMOVAL("revanced_adremover_custom_strings", "", ReturnType.STRING, true),
VIDEO_ADS_REMOVAL("revanced_video_ads_removal", true, ReturnType.BOOLEAN, true),
ADREMOVER_GENERAL_ADS_REMOVAL("revanced_adremover_ad_removal", true, ReturnType.BOOLEAN),
ADREMOVER_MERCHANDISE_REMOVAL("revanced_adremover_merchandise", true, ReturnType.BOOLEAN),
Expand Down

0 comments on commit 72a3cd0

Please sign in to comment.