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

Update appearance.js ImprovedTube.descriptionSidebar undefined #2430

Merged
merged 1 commit into from
Jul 2, 2024
Merged

Conversation

raszpl
Copy link
Contributor

@raszpl raszpl commented Jul 1, 2024

ImprovedTube.descriptionSidebar was undefined without undoTheNewSidebar, this is why proper code indentation is so important, just clicking auto align in IDE would reveal this bug

ImprovedTube.descriptionSidebar was undefined without undoTheNewSidebar, this is why proper code indentation is so important, just clicking auto align in IDE would reveal this bug
@ImprovedTube
Copy link
Member

indentation! yay! yay

@ImprovedTube ImprovedTube merged commit 41280ef into code-charity:master Jul 2, 2024
1 check passed
@ImprovedTube
Copy link
Member

about this code btw:
comparison: btw: #2251 and:

www.youtube.com##+js(set, yt.config_.EXPERIMENT_FLAGS.kevlar_watch_grid, false)
www.youtube.com##+js(set, yt.config_.EXPERIMENT_FLAGS.small_avatars_for_comments, false)
www.youtube.com##+js(set, yt.config_.EXPERIMENT_FLAGS.small_avatars_for_comments_ep, false)

thanks to @PoorChameleon #2038 (comment)

@raszpl raszpl deleted the patch-15 branch July 2, 2024 16:54
@raszpl
Copy link
Contributor Author

raszpl commented Jul 2, 2024

the way uBO 'set' works is they put a Proxy over object prototypes
https://github.com/gorhill/uBlock/blob/c154aaa69c6a2a4009d43923f1097c6298062b82/assets/resources/scriptlets.js#L556-L586
they even hide proxy presence so YT cant detect it (afaik YT doesnt try, but plenty of shady websites try to detect adblock/overrides) https://github.com/gorhill/uBlock/blob/c154aaa69c6a2a4009d43923f1097c6298062b82/assets/resources/scriptlets.js#L578-L580

This way no matter what inside real yt.config_.EXPERIMENT_FLAGS.kevlar_watch_grid any reader will always receive overridden value. We can definitely implement this, much saner, safer and more reliable than blindly writing to yt.config_.EXPERIMENT_FLAGS.kevlar_watch_grid hoping
1 its there
2 it wasnt read by YT engine yet

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