mirror of
https://github.com/revanced/revanced-integrations.git
synced 2025-01-05 17:45:49 +01:00
feat(YouTube - Comments): Add Hide Thanks button
and Hide 'Comments by members' header
options (#653)
This commit is contained in:
parent
376eb46f10
commit
240e805489
@ -14,6 +14,12 @@ final class CommentsFilter extends Filter {
|
||||
private final ByteArrayFilterGroup emojiPickerBufferGroup;
|
||||
|
||||
public CommentsFilter() {
|
||||
var commentsByMembers = new StringFilterGroup(
|
||||
Settings.HIDE_COMMENTS_BY_MEMBERS_HEADER,
|
||||
"sponsorships_comments_header.eml",
|
||||
"sponsorships_comments_footer.eml"
|
||||
);
|
||||
|
||||
var comments = new StringFilterGroup(
|
||||
Settings.HIDE_COMMENTS_SECTION,
|
||||
"video_metadata_carousel",
|
||||
@ -21,14 +27,19 @@ final class CommentsFilter extends Filter {
|
||||
);
|
||||
|
||||
var previewComment = new StringFilterGroup(
|
||||
Settings.HIDE_PREVIEW_COMMENT,
|
||||
Settings.HIDE_COMMENTS_PREVIEW_COMMENT,
|
||||
"|carousel_item",
|
||||
"comments_entry_point_teaser",
|
||||
"comments_entry_point_simplebox"
|
||||
);
|
||||
|
||||
var thanksButton = new StringFilterGroup(
|
||||
Settings.HIDE_COMMENTS_THANKS_BUTTON,
|
||||
"super_thanks_button.eml"
|
||||
);
|
||||
|
||||
commentComposer = new StringFilterGroup(
|
||||
Settings.HIDE_COMMENT_TIMESTAMP_AND_EMOJI_BUTTONS,
|
||||
Settings.HIDE_COMMENTS_TIMESTAMP_AND_EMOJI_BUTTONS,
|
||||
"comment_composer.eml"
|
||||
);
|
||||
|
||||
@ -38,8 +49,10 @@ final class CommentsFilter extends Filter {
|
||||
);
|
||||
|
||||
addPathCallbacks(
|
||||
commentsByMembers,
|
||||
comments,
|
||||
previewComment,
|
||||
thanksButton,
|
||||
commentComposer
|
||||
);
|
||||
}
|
||||
|
@ -147,9 +147,11 @@ public class Settings extends BaseSettings {
|
||||
"org.schabi.newpipe" /* NewPipe */, parentsAny(EXTERNAL_DOWNLOADER, EXTERNAL_DOWNLOADER_ACTION_BUTTON));
|
||||
|
||||
// Comments
|
||||
public static final BooleanSetting HIDE_PREVIEW_COMMENT = new BooleanSetting("revanced_hide_preview_comment", FALSE);
|
||||
public static final BooleanSetting HIDE_COMMENTS_BY_MEMBERS_HEADER = new BooleanSetting("revanced_hide_comments_by_members_header", FALSE);
|
||||
public static final BooleanSetting HIDE_COMMENTS_SECTION = new BooleanSetting("revanced_hide_comments_section", FALSE);
|
||||
public static final BooleanSetting HIDE_COMMENT_TIMESTAMP_AND_EMOJI_BUTTONS = new BooleanSetting("revanced_hide_comment_timestamp_and_emoji_buttons", TRUE);
|
||||
public static final BooleanSetting HIDE_COMMENTS_PREVIEW_COMMENT = new BooleanSetting("revanced_hide_comments_preview_comment", FALSE);
|
||||
public static final BooleanSetting HIDE_COMMENTS_THANKS_BUTTON = new BooleanSetting("revanced_hide_comments_thanks_button", TRUE);
|
||||
public static final BooleanSetting HIDE_COMMENTS_TIMESTAMP_AND_EMOJI_BUTTONS = new BooleanSetting("revanced_hide_comments_timestamp_and_emoji_buttons", TRUE);
|
||||
|
||||
// Description
|
||||
public static final BooleanSetting HIDE_CHAPTERS = new BooleanSetting("revanced_hide_chapters", TRUE);
|
||||
|
Loading…
Reference in New Issue
Block a user