Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix “Hide conversation” menu item #1202

Merged

Conversation

yatharth
Copy link
Contributor

Fixes #1027

Right now, the “Hide conversation” menu item (AKA the archive button) does not work. This was because of some CSS selectors seem to have become outdated. I have replaced them as follows:

  1. .uiLayer:not(.hidden_elem) ._54nq._2i-c._558b._2n_z.uiLayer:not(.hidden_elem) [role=menu]
  2. ${selectedConversationSelector} ._5blh._4-0h${selectedConversationSelector} [aria-haspopup=true] [role=button]

Note that the new selectors do not rely on minified class names like _5blh but rather on descriptive attributes like [role=button]. Hopefully, this means that these new selectors will be less likely to break with changes made to the Messenger website by Facebook.

Note also that I have tried to avoid using any localized attributes, so hopefully this works for all messenger.com localizations.

@sindresorhus sindresorhus merged commit 0b92e74 into sindresorhus:master Jan 16, 2020
@sindresorhus
Copy link
Owner

👍

@yatharth yatharth deleted the fix-hiding-conversations-nov2019 branch January 16, 2020 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Archive does nothing right now
2 participants