Fix “Hide conversation” menu item #1202
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
.uiLayer:not(.hidden_elem) ._54nq._2i-c._558b._2n_z
→.uiLayer:not(.hidden_elem) [role=menu]
${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.