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

Issue 1400 #1590

Closed
wants to merge 6 commits into from
Closed

Issue 1400 #1590

wants to merge 6 commits into from

Conversation

MohamedLebda
Copy link
Contributor

el was defined only when the page restarted or newly opened because the ImprovedTube.description when the page starts is fired from function.js by ImprovedTube.childHandler = function (node) and the node is passed as a parameter for ImprovedTube.description so el, in that case, is defined and works but after the page has loaded the function ImprovedTube.description is fired from cores.js with no parameter so that el is not defined in that case which is why it doesn't work.

This was referenced Feb 27, 2023
@ImprovedTube ImprovedTube mentioned this pull request Mar 10, 2023
@ImprovedTube
Copy link
Member

after the page has loaded the function ImprovedTube.description is fired from cores.js

ImprovedTube.description() appears in functions.js only

Youtube's new CSS id was added here just before: 0974dd4

  • (the old ID can be removed later if youtube completely removes the old description style too)

@ImprovedTube
Copy link
Member

added this code now

ImprovedTube added a commit that referenced this pull request Mar 10, 2023
@ImprovedTube
Copy link
Member

ImprovedTube commented Mar 18, 2023

BTW @MohamedLebda

else if (this.storage.description === "normal") {document.querySelector("#less").click() || document.querySelector("#collapse").click() ; }

this line and other feedback to users settings, must depend on storage.onChanged

currenly it leads to this bug:
#1608 (comment)

@MohamedLebda
Copy link
Contributor Author

currenly it leads to this bug:

it could be also
1608
could be the reason as it call the function twice
1608-log

@ImprovedTube
Copy link
Member

ImprovedTube commented Mar 18, 2023

no, calling it twice just makes it stay for some more nano seconds,
yet the line should be conditional to change of user settings ( storage.onChange )

ImprovedTube added a commit that referenced this pull request Jan 12, 2024
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