Skip to content

Commit

Permalink
add an option to disable in-video ads patch
Browse files Browse the repository at this point in the history
  • Loading branch information
KARAMI Mohamed committed Sep 16, 2023
1 parent e37f2c0 commit 71ba0ea
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/java/ma/wanam/youtubeadaway/BFAsync.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable {
private boolean bruteForceAds(ClassLoader cl) {
Instant start = Instant.now();
boolean foundBGClass = !Xposed.prefs.getBoolean("enable_bg_playback", true),
foundInVideoAds = false,
foundInVideoAds = !Xposed.prefs.getBoolean("hide_invideo_ads", true),
foundCardAds = !Xposed.prefs.getBoolean("hide_ad_cards", false),
skip;

Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
<string name="donate_btc_title">Donate BTC</string>
<string name="donate_pp_title">Donate through Paypal</string>
<string name="ads_removal">Ads removal</string>
<string name="invideo_ads_summary">Disable playing ads while watching a video</string>
<string name="invideo_ads_removal">Disable InVideo ads</string>
<string name="ad_cards_summary">This is experimental and may break back gesture and pull down to refresh feature!</string>
<string name="ad_cards_removal">Remove ad cards</string>
<string name="module_status">Module status</string>
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/res/xml/root_preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@

<PreferenceCategory app:title="@string/ads_removal">

<SwitchPreferenceCompat
app:defaultValue="true"
app:key="hide_invideo_ads"
app:summary="@string/invideo_ads_summary"
app:title="@string/invideo_ads_removal" />

<SwitchPreferenceCompat
app:defaultValue="false"
app:key="hide_ad_cards"
Expand Down

0 comments on commit 71ba0ea

Please sign in to comment.