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: Small codebase refactor to fix shortcuts for DOM buttons #976

Closed
wants to merge 3 commits into from
Closed

Conversation

talks2much
Copy link

Sorry for the latency, I'm really slow because its extremely hot.

I can see that codebase doesn't use JSDoc but I have added some types to simplify refactoring and ensure that it won't break anything. Trust me, typed codebases are awesome!

Also, I have introduced a helper printError that shows display errors in that form:
image

Hope you like that! It is more useful than silence.

The main purpose of this PR is to fix (and dynamically find only visible DOM buttons) and click them (usually they're <a>):
image

As @Michael82548 pointed out YouTube just changed the page layout. Sometimes, Google can introduce A/B experiments or just leave old page parts right in the DOM! In this case upper DOM is hidden for the user, but actually accessible via JS (selectors). This is how it looks like without hidden attribute:

image

Also, that's why YouTube is so slow, because the DOM is extremely heavy and inefficient. One of the forward steps could be to completely rewrite YouTube frontend, this also will allow usage of custom themes, like arwes.

closes #971

@User198263321
Copy link

So can we add an option or an entirely separate page in the extension settings for legacy UI toggles if the code is still there? I don't like the new UI shown in the image.

@User198263321
Copy link

It should most likely be pretty easy if it's just unhiding elements and JS, right?

This pull request was closed.
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.

YouTube "Like" and "Dislike" shortcuts no longer work [YouTube website change likely]
2 participants