fix(YouTube - Hide Shorts components): Shorts shelves are sometimes not hidden
Co-authored-by: inotia00 <108592928+inotia00@users.noreply.github.com>
This commit is contained in:
parent
e52114076e
commit
09bce22aeb
7 changed files with 62 additions and 81 deletions
|
|
@ -9,5 +9,13 @@ public final class ConversionContext {
|
|||
StringBuilder patch_getPathBuilder();
|
||||
|
||||
String patch_getIdentifier();
|
||||
|
||||
default boolean isHomeFeedOrRelatedVideo() {
|
||||
return toString().contains("horizontalCollectionSwipeProtector=null");
|
||||
}
|
||||
|
||||
default boolean isSubscriptionOrLibrary() {
|
||||
return toString().contains("heightConstraint=null");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,18 +26,12 @@ import java.util.List;
|
|||
public abstract class Filter {
|
||||
|
||||
public enum FilterContentType {
|
||||
CONTEXT,
|
||||
IDENTIFIER,
|
||||
PATH,
|
||||
ACCESSIBILITY,
|
||||
PROTOBUFFER
|
||||
}
|
||||
|
||||
/**
|
||||
* Context callbacks. Do not add to this instance,
|
||||
* and instead use {@link #addContextCallbacks(StringFilterGroup...)}.
|
||||
*/
|
||||
protected final List<StringFilterGroup> contextCallbacks = new ArrayList<>();
|
||||
/**
|
||||
* Identifier callbacks. Do not add to this instance,
|
||||
* and instead use {@link #addIdentifierCallbacks(StringFilterGroup...)}.
|
||||
|
|
@ -49,14 +43,6 @@ public abstract class Filter {
|
|||
*/
|
||||
public final List<StringFilterGroup> pathCallbacks = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* Adds callbacks to {@link #isFiltered(ContextInterface, String, String, String, byte[], StringFilterGroup, FilterContentType, int)}
|
||||
* if any of the groups are found.
|
||||
*/
|
||||
protected final void addContextCallbacks(StringFilterGroup... groups) {
|
||||
contextCallbacks.addAll(Arrays.asList(groups));
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds callbacks to {@link #isFiltered(ContextInterface, String, String, String, byte[], StringFilterGroup, FilterContentType, int)}
|
||||
* if any of the groups are found.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue