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: eradicate stories for non-english versions of fb #256

Merged
merged 1 commit into from
May 9, 2023

Conversation

nzawirski
Copy link
Contributor

This fixes the bug where stories were not eradicated for users who are not using english version of FB

As discovered in #216 aria-label is being translated if user is using fb in other languages, so the selectors were not eradicating stories container for them.

I chose to target the stories container with div[role='region'][data-visualcompletion='ignore-dynamic'] which is not perfect but there was no other way to distinguish it from other elements except for targeting the ridiculous auto-generated class name x1n2onr6 x121yvx8 xjkvuk6 xieb3on x9otpla x1iorvi4 and i don't know which would be worse.

The idea of targeting it in js like Eason did in #216 unfortunately does not work consistently because divs with [role=region] seem to be loading in different order and and in variable quantity, so sometimes the selector would match some unrelated element.

It works for me, tested it on chrome on various languages.

aria-label is being translated if user is using fb in other languages, so the selectors were not eradicating stories container for them.

Co-authored-by: EasonC13 <[email protected]>
Co-authored-by: pawel-tomkiel <[email protected]>
@nzawirski nzawirski marked this pull request as ready for review February 27, 2023 16:40
@jordwest
Copy link
Owner

jordwest commented May 9, 2023

Thanks for looking into this. The ridiculous auto-generated class names are crazy, but actually seem somewhat stable... I'm surprised that they haven't broken already.

@jordwest jordwest merged commit bceb2ec into jordwest:master May 9, 2023
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.

2 participants