mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-05-12 21:50:40 +00:00
Move adblock workaround into a toggle
This commit is contained in:
parent
ccb87ba2d7
commit
1fc75eb459
2 changed files with 9 additions and 2 deletions
|
|
@ -86,7 +86,7 @@ static int contrastMode() {
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
/*
|
%group uYouAdBlockingWorkaround
|
||||||
// Workaround: uYou 3.0.3 Adblock fix - @PoomSmart
|
// Workaround: uYou 3.0.3 Adblock fix - @PoomSmart
|
||||||
%hook YTAdsInnerTubeContextDecorator
|
%hook YTAdsInnerTubeContextDecorator
|
||||||
- (void)decorateContext:(id)context {
|
- (void)decorateContext:(id)context {
|
||||||
|
|
@ -151,7 +151,7 @@ BOOL isAd(YTIElementRenderer *self) {
|
||||||
%orig;
|
%orig;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
*/
|
%end
|
||||||
|
|
||||||
// Hide YouTube Logo - @dayanch96
|
// Hide YouTube Logo - @dayanch96
|
||||||
%group gHideYouTubeLogo
|
%group gHideYouTubeLogo
|
||||||
|
|
@ -1487,6 +1487,9 @@ static BOOL findCell(ASNodeController *nodeController, NSArray <NSString *> *ide
|
||||||
if (IS_ENABLED(@"disablePullToFull_enabled")) {
|
if (IS_ENABLED(@"disablePullToFull_enabled")) {
|
||||||
%init(gDisablePullToFull);
|
%init(gDisablePullToFull);
|
||||||
}
|
}
|
||||||
|
if (IS_ENABLED(@"uYouAdBlockingWorkaround_enabled")) {
|
||||||
|
%init(uYouAdBlockingWorkaround);
|
||||||
|
}
|
||||||
|
|
||||||
// YTNoModernUI - @arichorn
|
// YTNoModernUI - @arichorn
|
||||||
BOOL ytNoModernUIEnabled = IS_ENABLED(@"ytNoModernUI_enabled");
|
BOOL ytNoModernUIEnabled = IS_ENABLED(@"ytNoModernUI_enabled");
|
||||||
|
|
@ -1524,6 +1527,9 @@ static BOOL findCell(ASNodeController *nodeController, NSArray <NSString *> *ide
|
||||||
if (![allKeys containsObject:@"YouPiPEnabled"]) {
|
if (![allKeys containsObject:@"YouPiPEnabled"]) {
|
||||||
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"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
|
// Broken uYou 3.0.3 setting: No Suggested Videos at The Video End
|
||||||
// Set default to allow autoplay, user can disable later
|
// Set default to allow autoplay, user can disable later
|
||||||
if (![allKeys containsObject:@"noSuggestedVideoAtEnd"]) {
|
if (![allKeys containsObject:@"noSuggestedVideoAtEnd"]) {
|
||||||
|
|
|
||||||
|
|
@ -1002,6 +1002,7 @@ YTSettingsSectionItem *lowContrastModeButton = [%c(YTSettingsSectionItem)
|
||||||
# pragma mark - Miscellaneous
|
# pragma mark - Miscellaneous
|
||||||
SECTION_HEADER(LOC(@"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_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(@"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");
|
SWITCH_ITEM(LOC(@"Hide YouTube Logo"), LOC(@"Toggle this to hide the YouTube Logo in the YouTube App."), @"hideYouTubeLogo_enabled");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue