mirror of
https://github.com/revanced/revanced-integrations.git
synced 2025-01-06 01:55:50 +01:00
fix(YouTube - Hide Shorts components): Hide subscribe button in channel bar
This commit is contained in:
parent
d60dcf98ab
commit
9938bbf0de
@ -17,7 +17,12 @@ import app.revanced.integrations.youtube.shared.PlayerType;
|
|||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public final class ShortsFilter extends Filter {
|
public final class ShortsFilter extends Filter {
|
||||||
public static PivotBar pivotBar; // Set by patch.
|
public static PivotBar pivotBar; // Set by patch.
|
||||||
private final String REEL_CHANNEL_BAR_PATH = "reel_channel_bar.eml";
|
|
||||||
|
private final static String REEL_CHANNEL_BAR_PATH = "reel_channel_bar.eml";
|
||||||
|
/**
|
||||||
|
* For subscribe button that appears in the channel bar.
|
||||||
|
*/
|
||||||
|
private final static String REEL_METAPANEL_PATH = "reel_metapanel.eml";
|
||||||
|
|
||||||
private final StringFilterGroup shortsCompactFeedVideoPath;
|
private final StringFilterGroup shortsCompactFeedVideoPath;
|
||||||
private final ByteArrayFilterGroup shortsCompactFeedVideoBuffer;
|
private final ByteArrayFilterGroup shortsCompactFeedVideoBuffer;
|
||||||
@ -192,8 +197,8 @@ public final class ShortsFilter extends Filter {
|
|||||||
StringFilterGroup matchedGroup, FilterContentType contentType, int contentIndex) {
|
StringFilterGroup matchedGroup, FilterContentType contentType, int contentIndex) {
|
||||||
if (contentType == FilterContentType.PATH) {
|
if (contentType == FilterContentType.PATH) {
|
||||||
if (matchedGroup == subscribeButton || matchedGroup == joinButton) {
|
if (matchedGroup == subscribeButton || matchedGroup == joinButton) {
|
||||||
// Filter only when reelChannelBar is visible to avoid false positives.
|
// Selectively filter to avoid false positive filtering of other subscribe/join buttons.
|
||||||
if (path.startsWith(REEL_CHANNEL_BAR_PATH)) {
|
if (path.startsWith(REEL_CHANNEL_BAR_PATH) || path.startsWith(REEL_METAPANEL_PATH)) {
|
||||||
return super.isFiltered(
|
return super.isFiltered(
|
||||||
identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex
|
identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user