Added iSponsorBlock Button (LowContrastMode)

This commit is contained in:
arichornlover 2023-12-14 22:21:58 -06:00 committed by GitHub
parent da5f6223de
commit 4c92078d36
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -300,6 +300,19 @@ UIColor *lcmHexColor;
%orig([UIColor whiteColor]);
}
%end
%hook YTRightNavigationButtons // iSponsorBlock
- (NSMutableArray *)buttons {
NSMutableArray *buttons = %orig
UIImage *image = [UIImage imageWithContentsOfFile:[tweakBundle pathForResource:@"sponsorblocksettings-20@2x" ofType:@"png"]];
image = [image imageWithTintColor:[UIColor whiteColor] renderingMode:UIImageRenderingModeAlwaysTemplate];
if (buttons.count > 0) {
UIButton *sponsorBlockButton = buttons[0];
[sponsorBlockButton setImage:image forState:UIControlStateNormal];
[sponsorBlockButton setTintColor:[UIColor whiteColor]];
}
return buttons;
}
%end
%end
/*