Skip to content

Commit

Permalink
fix(YouTube - Hide Shorts components): Correctly hide join button
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Mar 26, 2024
1 parent 59165de commit 0ab9c70
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -27,6 +27,7 @@ public final class ShortsFilter extends Filter {
private final StringFilterGroup subscribeButtonPaused;
private final StringFilterGroup soundButton;
private final StringFilterGroup infoPanel;
private final StringFilterGroup joinButton;
private final StringFilterGroup shelfHeader;

private final StringFilterGroup actionBar;
Expand Down Expand Up @@ -66,7 +67,7 @@ public ShortsFilter() {
"/frame0.jpg");

// Shorts player components.
var joinButton = new StringFilterGroup(
joinButton = new StringFilterGroup(
Settings.HIDE_SHORTS_JOIN_BUTTON,
"sponsor_button"
);
Expand Down Expand Up @@ -182,7 +183,9 @@ boolean isFiltered(@Nullable String identifier, String path, byte[] protobufBuff

// Filter other path groups from pathFilterGroupList, only when reelChannelBar is visible
// to avoid false positives.
if (matchedGroup == subscribeButton) {
if (matchedGroup == subscribeButton ||
matchedGroup == joinButton
) {
if (path.startsWith(REEL_CHANNEL_BAR_PATH)) return super.isFiltered(
identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex
);
Expand Down

0 comments on commit 0ab9c70

Please sign in to comment.