Skip to content
This repository has been archived by the owner on Jun 6, 2019. It is now read-only.

Wait until "Block by CSS selector" context menu is clicked to find unique css selector #94

Closed
wants to merge 1 commit into from

Conversation

reaktivo
Copy link

@reaktivo reaktivo commented Feb 12, 2019

There's a performance issue when right-clicking on a Twitter timeline, this is due to the way Twitter builds it's elements (with dozens of css class names) which impacts the way the library unique-selector finds elements. This causes a few seconds delay every time anything on a Twitter timeline is clicked.

You can see a bit more details here: https://community.brave.com/t/right-click-hangs-on-mobile-twitter/43332/4

This PR rewrites app/content.ts and app/background/events/cosmeticFilterEvents.ts so that the actual unique call only happens after the Context sub menu item is clicked.

FYI, I wasn't able to get this changes running locally, so I've wrote this PR blindly – I not 100% sure it's going to work.

@cezaraugusto
Copy link
Contributor

hi @reaktivo thanks for making this and sorry for taking so long to respond.

we moved the brave-extension to our main repo called brave-core. I didn't get the chance to check your code yet but if you like you can do your PR against brave-core and I will ensure it gets reviewed. file structure has changed but code remains the same.

I'm going to close this as we're archiving this repo now but thanks again for making this change! looking forward for this in extension's new home :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants