diff --git a/Sources/uYouPlus.xm b/Sources/uYouPlus.xm index 654878c..9d1746a 100644 --- a/Sources/uYouPlus.xm +++ b/Sources/uYouPlus.xm @@ -86,7 +86,7 @@ static int contrastMode() { } %end -/* +%group uYouAdBlockingWorkaround // Workaround: uYou 3.0.3 Adblock fix - @PoomSmart %hook YTAdsInnerTubeContextDecorator - (void)decorateContext:(id)context { @@ -151,7 +151,7 @@ BOOL isAd(YTIElementRenderer *self) { %orig; } %end -*/ +%end // Hide YouTube Logo - @dayanch96 %group gHideYouTubeLogo @@ -1487,6 +1487,9 @@ static BOOL findCell(ASNodeController *nodeController, NSArray *ide if (IS_ENABLED(@"disablePullToFull_enabled")) { %init(gDisablePullToFull); } + if (IS_ENABLED(@"uYouAdBlockingWorkaround_enabled")) { + %init(uYouAdBlockingWorkaround); + } // YTNoModernUI - @arichorn BOOL ytNoModernUIEnabled = IS_ENABLED(@"ytNoModernUI_enabled"); @@ -1524,6 +1527,9 @@ static BOOL findCell(ASNodeController *nodeController, NSArray *ide if (![allKeys containsObject:@"YouPiPEnabled"]) { [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"YouPiPEnabled"]; } + if (![allKeys containsObject:@"uYouAdBlockingWorkaround_enabled"]) { + [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"uYouAdBlockingWorkaround_enabled"]; + } // Broken uYou 3.0.3 setting: No Suggested Videos at The Video End // Set default to allow autoplay, user can disable later if (![allKeys containsObject:@"noSuggestedVideoAtEnd"]) { diff --git a/Sources/uYouPlusSettings.xm b/Sources/uYouPlusSettings.xm index 66766d5..a937ad2 100644 --- a/Sources/uYouPlusSettings.xm +++ b/Sources/uYouPlusSettings.xm @@ -1002,6 +1002,7 @@ YTSettingsSectionItem *lowContrastModeButton = [%c(YTSettingsSectionItem) # pragma mark - Miscellaneous SECTION_HEADER(LOC(@"MISCELLANEOUS")); + SWITCH_ITEM2(LOC(@"Adblock Workaround"), LOC(@"Uses stronger adblocking code. Can cause blank spots on homepage"), @"uYouAdBlockingWorkaround_enabled"); SWITCH_ITEM2(LOC(@"Fake Premium"), LOC(@"Uses Premium logo and creates fake buttons in the You tab"), @"youTabFakePremium_enabled"); // SWITCH_ITEM(LOC(@"Center YouTube Logo"), LOC(@"Toggle this to move the official YouTube Logo to the Center. App restart is required."), @"centerYouTubeLogo_enabled"); SWITCH_ITEM(LOC(@"Hide YouTube Logo"), LOC(@"Toggle this to hide the YouTube Logo in the YouTube App."), @"hideYouTubeLogo_enabled");