mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-03-11 21:26:04 +00:00
Option Improvements
Improved 2 Options - Hide Shorts Cells - Hide Download Button under Player
This commit is contained in:
parent
ce82c117db
commit
43b542d697
1 changed files with 14 additions and 8 deletions
22
uYouPlus.xm
22
uYouPlus.xm
|
|
@ -797,20 +797,26 @@ static void replaceTab(YTIGuideResponse *response) {
|
|||
[self deleteItemsAtIndexPaths:@[indexPath]];
|
||||
}
|
||||
|
||||
// Hide all Shorts Videos in Channels - @arichorn
|
||||
if (IsEnabled(@"hideShortsFromChannel_enabled") && [result rangeOfString:@"eml.shorts-video-item"].location != NSNotFound) {
|
||||
[self deleteItemsAtIndexPaths:@[indexPath]];
|
||||
}
|
||||
|
||||
// Hide the Download Button under the Video Player - @arichorn
|
||||
if (IsEnabled(@"hideAddToOfflineButton_enabled") && [result rangeOfString:@"id.ui.add_to_offline.button"].location != NSNotFound) {
|
||||
[self deleteItemsAtIndexPaths:@[indexPath]];
|
||||
// Hide Shorts Cells (from YTLite) - @dayanch96
|
||||
if (IsEnabled(@"hideShortsCells_enabled") && ([idToRemove isEqualToString:@"eml.shorts-grid"] || [idToRemove isEqualToString:@"eml.inline_shorts"] || [idToRemove isEqualToString:@"eml.shorts-video-item"])) {
|
||||
[self removeCellsAtIndexPath:indexPath];
|
||||
}
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
%end
|
||||
|
||||
// Hide the Download Button under the Video Player (Experimental) - @arichorn
|
||||
%hook _ASDisplayView
|
||||
- (id)initWithElement:(ELMElement *)element {
|
||||
id result = %orig;
|
||||
if (IsEnabled(@"hideAddToOfflineButton_enabled") && ([element respondsToSelector:@selector(identifier)] && [[element identifier] isEqualToString:@"id.ui.add_to.offline.button"]) {
|
||||
[result setHidden:YES];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
%end
|
||||
|
||||
// App Settings Overlay Options
|
||||
%group gDisableAccountSection
|
||||
%hook YTSettingsSectionItemManager
|
||||
|
|
|
|||
Loading…
Reference in a new issue