CustomTube icon indicating copy to clipboard operation
CustomTube copied to clipboard

Normal YouTube layout visible when website is loading.

Open Lort533 opened this issue 1 year ago • 3 comments

Hello! First off, I'd like to say that this addon is AWESOME! But there are some bugs, including this one.

When YouTube page loads, for around 4 seconds it shows up the normal layout of YouTube. It's not that much irritating, but a nice thing to look out for.

I'm not sure if that's because the addon can't work in between loading time, or you don't want to mess with the website when it's still loading, but it would be nice to make it load more dynamically, so it doesn't change the already loaded website, but does that on fly instead, if possible.

If not/you're not interested in doing so, you can go for a workaround. Adding visibility: hidden; to #body in CSS is enough to make the website mostly invisible until it fully loads, and then, when the addon starts working, it can switch this option to visible, or just remove this option entirely.

I said that this makes the website mostly invisible, because I found at least one class where visibility is set to visible with !important option, it's ct-uix-button-arrow. I think that this class comes from your extension, so you can probably fix that somehow, or at least make a loop that sets all visibility: visible !important to hidden, and brings it back to original state once extension starts editing the website layout.

Lort533 avatar Feb 07 '24 11:02 Lort533

That pretty much happens with a lot of themes, it’s not the biggest problem, just a little glaring.

HAYDENCRAFT2008 avatar Feb 07 '24 12:02 HAYDENCRAFT2008

Yeah, it's a change that simply improves the experience, not a big bug, if you can even call that a bug, rather not implemented feature. But depending on how extension development works, it should be rather easy to implement, at least the second, bandaid one I suggested.

Lort533 avatar Feb 07 '24 12:02 Lort533

Thank you for providing a potential solution to this issue. I might be able to look into this. Only problem is that it would be impossible for it to be optional, either everyone would have it or no one would.

I'm not sure if that's because the addon can't work in between loading time

It's because the extension has to wait a certain amount of time to load the main.js file. This is because it needs to get the user's configuration values, so it's not possible to make it load faster.

because I found at least one class where visibility is set to visible with !important option, it's ct-uix-button-arrow.

.ct-uix-button-arrow isn't super common, and would only appear once the page has fully loaded anyway, so this wouldn't be an issue.

lightbeam24 avatar Feb 07 '24 13:02 lightbeam24