raingart / Nova-YouTube-extension

Apache License 2.0
199 stars 9 forks source link

[Bug] Collapse Comments display property #143

Closed misspent closed 5 months ago

misspent commented 5 months ago

This messes with the display of certain themes and sometimes default YouTube; some of it is probably thanks to some of the other scripts I have installed, but I'd love you to make it Inherit and not unset This fixed all the issues I was having.

               btn.addEventListener('click', () => {
                  btn.remove();
                  el.style.display = 'unset';
                  window.dispatchEvent(new Event('scroll'));
               });

It "bugged" the padding, margin, and background (sometimes) when it was set to unset. This is a tiny "bug" and rather irrelevant, but I thought I'd let you know. If you have a reason for using unset, then by all means keep it the same. I'll just change it to inherit myself.

Thank you for creating this masterpiece.

raingart commented 5 months ago

I don't know why I used unset. Sometimes after a while I look at my old code and think - who wrote this crap?

In the near issue #140 they complained that this causes problems with displaying tags

but I thought that the problem was that youtube would check the visibility of the element, and the script would not run correctly As a result, in the test version I replaced unset with

el.style.visibility = 'visible';
el.style.overflow = 'inherit';
el.style.height = 'inherit';

but having just checked with inherit, it turned out that the tags are displayed correctly

misspent commented 5 months ago

Test version worked like a charm, thank you.

Glad I'm not the only who looks back at past projects and thinks "Wtf is this shit"