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

Always jumps to the description part #2499

Open
merlin555 opened this issue Jul 30, 2024 · 51 comments
Open

Always jumps to the description part #2499

merlin555 opened this issue Jul 30, 2024 · 51 comments
Labels
good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥ YouTube changed

Comments

@merlin555
Copy link

merlin555 commented Jul 30, 2024


re-opening: #2499 (comment)



Hello everyone,

For 1-2 weeks I have had the following problem in the Vivaldi browser when I load YouTube.
Instead of the usual way that you log in after the page has loaded, is right at the top,
it is always at the beginning with the description.
Only “reload page” helps.
This problem does not exist in Firefox.

Here is a video that shows the whole problem:
https://mega.nz/file/JhpW2LBB#-LKyXZ2wxmZYqlZ5Y1JgQlbdBgSaLt8Oc06at-zOWSM

And here's mine "improvedtube.json" file.
improvedtube.json

Regards,

Merlin

@merlin555 merlin555 added Bug Bug or required update after YouTube changes good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥ labels Jul 30, 2024
@ImprovedTube ImprovedTube removed the Bug Bug or required update after YouTube changes label Jul 30, 2024
@ImprovedTube
Copy link
Member

hi! @merlin555 you can check the fix here: https://chromewebstore.google.com/detail/improve-youtube-test-for/lodjfjlkodalimdjgncejhkadjhacgki

@ImprovedTube
Copy link
Member

(to be closed when the main version is updated)

@ImprovedTube
Copy link
Member

Google is delaying the update. (Our Beta with 20000 users is updated quickly or automated often).
The main version usually has to wait a day or so for updates. (And sometimes it might takes a week. Sais: "spam violation" again (the word youtube was used "too much". - Yet we made this necessary update to avoid this bug and didn't change the description. And already replaced most occurrences with "YT" before. Next time we might just delete the whole description, which would do less harm.) (until now the word appeared 9 times in the description (little to describe our 180 features and toggles. And 6 times in the two mentioned magazine review links with quote.
While "adblock for youtube" for example uses the word 17 times 🤷 and has 9-10 million users and one feature https://chromewebstore.google.com/detail/adblock-for-youtube/cmedhionkhpnakcndndgjdbohmhepckk)

@merlin555
Copy link
Author

@ImprovedTube

Works well so far.
Just with a delay.

Thanks!

Forgot to mention, the problem only occurs when you open the video in a new TAB.
If you open the video in the same TAB, this problem doesn't exist.

@ImprovedTube
Copy link
Member

How much delay? Didn't change that. Description should expand as soon as it is loaded or maybe after 0.x seconds - if it loaded late. The addition/change is only to deny youtube's scripts to scroll in the right moment.

if (this.storage.description === "expanded") {
ImprovedTube.forbidFocus = function (ms) {
const originalFocus = HTMLElement.prototype.focus; // Backing up default method - other methods: Element.prototype.scrollIntoView window.scrollTo window.scrollBy
// Override YouTube's scroll method:
HTMLElement.prototype.focus = function() {console.log("Preventing YouTube's scripted scrolling, when expanding the video description for you"); }
setTimeout(function() { HTMLElement.prototype.focus = originalFocus; }, ms); // Restoring JS's "focus()"
}
if (el) {
ImprovedTube.forbidFocus(1200); // setTimeout(function () {ImprovedTube.elements.player.focus();}, 1200);
el.click();
}
else { // this rest will be unnecessary with proper timing:
var tries = 0; var intervalMs = 210; if (location.href.indexOf('/watch?') !== -1) {var maxTries = 10;} else {var maxTries = 0;} // ...except when it is an embedded player?
var waitForDescription = setInterval(() => {
if (++tries >= maxTries) {
if (el) {
ImprovedTube.forbidFocus(1200); // setTimeout(function () {ImprovedTube.elements.player.focus();}, 1000);
el.click();
clearInterval(waitForDescription);
}
el = document.querySelector('#description-inline-expander')
intervalMs *= 1.11; }}, intervalMs);
}
}
}
/*------------------------------------------------------------------------------
HIDE DETAIL BUTTON

@Corruptinglyneedful
Copy link

Happening on Firefox 128.0.3

@merlin555
Copy link
Author

@ImprovedTube

Let's say 0.3 - 0.5 seconds.
It's not always the same.
It's best to open several TABs in the background to test.

I've never had this problem under Firefox v128.0.3 until now.

@merlin555
Copy link
Author

@ImprovedTube

If the "Auto Cinema Mode" (Player) is turned on in the settings, it doesn't work.
Except mostly the first 3 new TABS that you open in the background.
The following ones remain in the middle.
Sometimes only the first TAB that you open in the background works.

Reloading the page (F5 key) always solves the problem.

@ImprovedTube
Copy link
Member

ImprovedTube commented Jul 31, 2024

hi @Corruptinglyneedful!

So you only got the bug with both features enabled? @merlin555 - Cinema mode is new(@SanderDebets); (Auto requires the button to be enabled too as you noticed) & reminded me to also release General: "Dim Youtube's Pages, except what I mouse-over!" (can you compare that? We don't have to hide stuff completely. But it can depend both mouse-over (hover) and pause/play (and we can allow to set the exact percentage of transparency)

@merlin555
Copy link
Author

@ImprovedTube

The thing about “Cinema Mode” was wrong.
It has nothing to do with it, I just realized.
I thought it was in "Cinema Mode" because it hasn't worked properly again since today.
Yesterday it still worked as written.
Now it's causing problems.
The first few TABS work as written above, where I suspected “Cinema Mode”.
Something changed again on YouTube today.

@ImprovedTube
Copy link
Member

ImprovedTube commented Jul 31, 2024

thanks @merlin555, with the fix or without?

@merlin555
Copy link
Author

@ImprovedTube

With 4.1077 the problem is always there.
With the "FIX" the first newly opened TABS almost always work in the background where you open.
Before, even the first 5 TABS worked.
With the 6th TAB it stopped working.
It's not always the same.
But if it doesn't work, then all the following TABS won't work either.

ImprovedTube added a commit that referenced this issue Jul 31, 2024
@ImprovedTube
Copy link
Member

The addition/change is only to deny youtube's scripts to scroll in the right moment.

forbidding the scrolling for 3.6s instead of 1.2s in background tabs
dd1f7f9?diff=unified&w=1

if(document.hidden) ms = 3*ms;

(you can try latest changes @chrome://extensions developer mode load unpacked )

@Corruptinglyneedful
Copy link

Corruptinglyneedful commented Jul 31, 2024

hi @Corruptinglyneedful!

I am not quite sure what you are asking me. All I know is I am on the Firefox version and it is jumping the page down to about the description on nearly every video and I'm quickly growing tired of this bug. It wasn't doing this before and I'd like to know what is causing it and more importantly how to fix it.

@ImprovedTube
Copy link
Member

ImprovedTube commented Jul 31, 2024

@Corruptinglyneedful
Youtube is doing that when expanding the description.
Yet we prevent that, when our feature "description: expanded" runs.
When exactly did this start for you? (a fix was published in firefox 3 days ago)
Try to log out too

@Corruptinglyneedful
Copy link

@Corruptinglyneedful Youtube is doing that when expanding the description. Yet we prevent that if when our the feature "description: expanded" runs. When exactly did this start for you? (a fix was published in firefox 3 days ago) Try to log out too

It has been doing it a number of weeks now. It is still doing it today. Is there a setting I should untick/tick because I don't have the description set to show. I have to click show more.

@ImprovedTube
Copy link
Member

@Corruptinglyneedful what are all your settings? try disabling appearance options player size, header, transcript, chapters.
beyond that it also just takes a few clicks to try an old version with all your settings: https://addons.mozilla.org/en-US/firefox/addon/youtube-addon/versions/
thanks

@Corruptinglyneedful
Copy link

@Corruptinglyneedful what are all your settings? try disabling appearance options player size, header, transcript, chapters. beyond that it also just takes a few clicks to try an old version with all your settings: https://addons.mozilla.org/en-US/firefox/addon/youtube-addon/versions/ thanks

Do you have a way to dump those settings to a file I can send within the extension? There are way too many settings to just simply list them all out and I would not know if one is conflicting or w/e. When I first installed this, I went through every available option and looked and tweaked here and there. It could be literally anything doing it.

And I'm not too keen on being locked to an old version. With something that moves as fast as Youtube changes do, you have to stay current.

@LinguaOccultus
Copy link

I can confirm this issue, too. It started just a few weeks ago for me also.

My guess is, that it is the auto generated content added by YouTube into the videos description which cannot be hidden by any means of the extension by now. When loading the page, you first see the top with the video, it then »jumps« directly down to this in the desctiption (at the end of it) and then jumps back to the top.

I think this could be prevented by hiding/blocking that part which is useless anyway. There even is a text string stating auto generated by YouTube at the beginning and it mostly points to shorts containing the video and other »related« content.

Just went through all the extensions settings and wether found a way to hide/block it nor anything else which might cause this. I tried using the element picker from uBlock Origin to just block this part but only found I can block the whole description or nothing, so a more detailed selection is needed.

@merlin555
Copy link
Author

@LinguaOccultus

Thank you for your information.

@LinguaOccultus
Copy link

LinguaOccultus commented Aug 2, 2024

@LinguaOccultus

Thank you for your information.

I am using Vivaldi (another Chromium-based Browser of the former Opera developers until version 12.xx) and I am used to messing around with this extension as it often is having issues in this browser.

At the moment, it was working relatively well and it became essential to stop all the bullshit and bloat-stuff on YouTube. I did test alternatives but found this one the best in the end.

I also do understand that the website of YouTube is permanently changing and the extension needs to be adjusted accordingly as many other extensions for the very same reason. However, the web today is barely a useful place without an ad and cookie note blocker and my other extension to customize your most used pages or extend their functionality.

But even though I am technically experienced, alone out of need, I could not solve this one when it started. The only workaround might be, hiding or at least collapsing the details until this is adressed but I fear, we have to wait for a fix – or better: a function to hide/block this new bullshit – here.

I can also confirm that I have set my details panel to being expanded automatically so you do not have to click it all the time for that (who ever thought this is a good idea instead of stopping to put all the unasked content into it). So, at the moment it seems, there is only tradeoff possible.

Edit: I attached my settings JSON file if that helps in any way. Whith this settings, the issue can be still seen.
improvedtube.json

@merlin555
Copy link
Author

merlin555 commented Aug 2, 2024

@LinguaOccultus

I just imported and tested your settings.
I have quite a problem with that.

  1. On the main page of "ABOS" certain thumbnails are cut off from the videos.

  2. The videos themselves cannot be played in the tab that is open in the background.
    The "Play" button doesn't work, the one in the video itself and at the bottom of the bar.
    Sometimes it helps to reload the page with the F5 key, but not always.

  3. The thumbnails in the video itself, where you can jump in the timeline, are moved downwards.

Here is a video I recorded about it.
https://mega.nz/file/IwhwGYrI#YyDHvqVmcSRa21fSqc50chFaMomhQ4zkTveJOlzmjuo

And here again my current setting file.
improvedtube.json

@merlin555
Copy link
Author

@LinguaOccultus

I'm just going to do it.
Thanks for the tip.

@raszpl
Copy link
Contributor

raszpl commented Aug 3, 2024

YT changed the way expand description works, it now grabs focus, scrolls and draws stupid frame around Description
fixed in https://github.com/raszpl/tweaks4ytube/blob/927b909a4392176ce1db8cc54e17e95e1a231955/js%26css/web-accessible/www.youtube.com/appearance.js#L421

@ImprovedTube
Copy link
Member

ImprovedTube commented Aug 3, 2024

hi! @LinguaOccultus

Could you maybe test our configs

sure! 👍 if necessary

Yet, as I have seen above this will be closed

yes! should have closed this most likely.

...something the developer needs to take care of. I am only exporting...

Import Settings always worked like this - it doesnt replace old settings with new ones, it adds new settings on top of old ones

(#2506 (comment))


hi! @raszpl 👍

what does L421 change / fix? (+why not wrap the (any) feature in if (this.storage.description === 'expanded') { .... }
( Fixed like this yet:

ImprovedTube.expandDescription = function (el) {
if (this.storage.description === "expanded") {
ImprovedTube.forbidFocus = function (ms) {
const originalFocus = HTMLElement.prototype.focus; // Backing up default method - other methods: Element.prototype.scrollIntoView window.scrollTo window.scrollBy
// Override YouTube's scroll method:
HTMLElement.prototype.focus = function() {console.log("Preventing YouTube's scripted scrolling, when expanding the video description for you"); }
if(document.hidden) ms = 3*ms;
setTimeout(function() { HTMLElement.prototype.focus = originalFocus; }, ms); // Restoring JS's "focus()"
}
if (el) {
ImprovedTube.forbidFocus(1200); // setTimeout(function () {ImprovedTube.elements.player.focus();}, 1200);

)


@merlin555

I have quite a problem with that.

Some of your issues sound like a conflict with another extension or browser setting. I myself have found that an issue with stopping autoplay was caused by the setting being enabled in the browser (Vivaldi has one but it does not work in most cases; known bug still unsolved) and by using an extension for it together. Also, blockers like uBlock Origin and such easily can break websites. You could test in a new profile with just this extension or the YouTube website in a private tab to further track the issue down. Sometimes, when trying to hard to confirm an issue to a specific source in question one forgets that others might cause it aswell. Also happened to myself several times before. ;-)

But I can confirm that I do not have any of those issue in my side so far (aside from abos which I do not use and without being able to test your config).

interesting!


@Corruptinglyneedful:

Do you have a way to dump those settings to a file I can send within the extension?

yes top right settings, backup, export

not too keen on being locked to an old version.

firefox allows to switch version easily as if it was an extension feature (so thats a great tool for testing /making sure)

@Corruptinglyneedful
Copy link

I've had several hours now and since I disabled Forced Theater mode setting and just went to using the button on the player directly, I've had no more problems with it jumping to the description. So it was either that or an update that fixed it.

@merlin555
Copy link
Author

@Corruptinglyneedful

I just disabled the "Forced Theater" mode.
The problem is still there.
With version. 4.1077.

That's just the common thing, it's happened to me too.
You think you've found the problem and it works.
But after a short time, you notice that the problem reappears.
I always close the browser first and clear the cache to be on the safe side.

What is very important to mention is that you have to open a new TAB in the background of the YouTube video
and not in the same TAB or window.
And it is also important that very often the first TAB opened works in the background and jumps up.
Sometimes up to the first 5 TABS that I open like this.
You really have to open several to 10 TABS in the background for the problem to show up, almost always.

The only thing that helps is reloading the page (F5 key).

Can't you install this so that when loading, the key command CTRL+HOME is sent?
So that the page jumps up?

@ImprovedTube
Copy link
Member

ImprovedTube commented Aug 5, 2024

hope to see you guys in some of our 500+ open threads
Riddle : these 25 might benefit most from further testing / speculating

( while_ others have steps to work on defined already, like these 41: 🧩Plan ready Solution or some specification noted; To-Do; steps for implementation (+raw brainstorming too maybe) , and there are many more labely: https://github.com/code-charity/youtube/labels?sort=count-desc )


#2499 (comment) this was your refinement for background tabs @merlin555:

forbidding the scrolling for 3.6s instead of 1.2s in background tabs
dd1f7f9?diff=unified&w=1

if(document.hidden) ms = 3*ms;

(you can try latest changes @chrome://extensions developer mode load unpacked )

@merlin555
Copy link
Author

Today August 6th, 16:00 GMT+1 it works fine with version 4.1077.
You don't notice any more jumping either.

@LinguaOccultus
Copy link

Today August 6th, 16:00 GMT+1 it works fine with version 4.1077. You don't notice any more jumping either.

I can confirm that.

@merlin555
Copy link
Author

@LinguaOccultus
Thank you for the confirmation.

@ImprovedTube
Thanks for the valuable work.

ImprovedTube added a commit that referenced this issue Aug 9, 2024
@LinguaOccultus
Copy link

Just found that the jumping issue is back again for me ... =(

@Corruptinglyneedful
Copy link

Yup, I've noticed it as well.

This was after I had to clear out all cache and cookies and reset my settings and reapply them all one by one.

I think this is some change Youtube is doing that's messing with it.

@LinguaOccultus
Copy link

Yup, I've noticed it as well.

This was after I had to clear out all cache and cookies and reset my settings and reapply them all one by one.

I think this is some change Youtube is doing that's messing with it.

If your are using Chrome (and also any Chromium-browser like Vivaldi in my case should work similar) you can safely exclude storage (especially extension storage), application storage and website settings from the browser extended application deletion dialogue to prevent this from happening and keep the settings.

Those contain minimum data as described – except you meant to delete the settings.

It most likely again is YouTube changing stuff around again; since the added page areas we expect are causing this are newly added, more frequent changes to them are usual until they are satisfied with it. That, unfortunately also means, extensions which are effected by this, need to be properly adjusted aswell several times more often than usual.

@Corruptinglyneedful
Copy link

Yup, I've noticed it as well.
This was after I had to clear out all cache and cookies and reset my settings and reapply them all one by one.
I think this is some change Youtube is doing that's messing with it.

If your are using Chrome (and also any Chromium-browser like Vivaldi in my case should work similar) you can safely exclude storage (especially extension storage), application storage and website settings from the browser extended application deletion dialogue to prevent this from happening and keep the settings.

Those contain minimum data as described – except you meant to delete the settings.

It most likely again is YouTube changing stuff around again; since the added page areas we expect are causing this are newly added, more frequent changes to them are usual until they are satisfied with it. That, unfortunately also means, extensions which are effected by this, need to be properly adjusted as well several times more often than usual.

Nope using Firefox, my man. 129.0.2

What setting is doing this?

@merlin555
Copy link
Author

Now at 7 a.m. GMT+1 on August 23rd, with Vivaldi browser version 6.8.3381.55 I haven't had any problems so far.

@LinguaOccultus
Copy link

Yup, I've noticed it as well.
This was after I had to clear out all cache and cookies and reset my settings and reapply them all one by one.
I think this is some change Youtube is doing that's messing with it.

If your are using Chrome (and also any Chromium-browser like Vivaldi in my case should work similar) you can safely exclude storage (especially extension storage), application storage and website settings from the browser extended application deletion dialogue to prevent this from happening and keep the settings.
Those contain minimum data as described – except you meant to delete the settings.
It most likely again is YouTube changing stuff around again; since the added page areas we expect are causing this are newly added, more frequent changes to them are usual until they are satisfied with it. That, unfortunately also means, extensions which are effected by this, need to be properly adjusted as well several times more often than usual.

Nope using Firefox, my man. 129.0.2

What setting is doing this?

Haven't used the fox for quite a while now; but if the dialogue still looks like this:

image

The both under »Data« should be excluded in that case. Maybe it is not so easy, but normally those categories are there for giving you a choice what exactly you want to delete.

Now at 7 a.m. GMT+1 on August 23rd, with Vivaldi browser version 6.8.3381.55 I haven't had any problems so far.

Just tested any me neither; maybe the guys were very quick with fixing or YouTube changed something again ... ^^

@merlin555
Copy link
Author

Now 10 hours later it still works perfectly.

@LinguaOccultus
Copy link

As of today, the jumping issues returned for me the third time. However, this time only for videos with chapters. They are now also added to the description below the video sometimes instead of just in the list to the right to where it then is jumping when opening the page.

@Corruptinglyneedful
Copy link

Corruptinglyneedful commented Sep 29, 2024

As of today, the jumping issues returned for me the third time. However, this time only for videos with chapters. They are now also added to the description below the video sometimes instead of just in the list to the right to where it then is jumping when opening the page.

Yup been back off and on for a week or longer for me. I quit trying to figure out what's doing it, just know it is the extension/script.. Latestet Firefox. 130.0.1

@merlin555
Copy link
Author

@LinguaOccultus

Can you please give me a link as an example with chapters?
Do you mean Vivaldi or Firefox?

@ImprovedTube ImprovedTube reopened this Sep 30, 2024
@ImprovedTube
Copy link
Member

hi again and thanks @LinguaOccultus @Corruptinglyneedful

@Corruptinglyneedful And you still don't auto-expand the video description? or theater mode?
Please export your settings this time if you don't mind. (And @LinguaOccultus too? then we can check the intersection)

(also increasing the duration that we disallow Youtube to scroll when auto-expanding the description (just to make sure):
2d07dc6 )

@LinguaOccultus
Copy link

@LinguaOccultus

Can you please give me a link as an example with chapters? Do you mean Vivaldi or Firefox?

I did not keep any links as it seemed to be happening with all videos with chapters. There are quite a lot on YouTube; audio books for example often have them but many other formats, too.

I am still using Vivaldi for the moment.

hi again and thanks @LinguaOccultus @Corruptinglyneedful

@Corruptinglyneedful And you still don't auto-expand the video description? or theater mode? Please export your settings this time if you don't mind. (And @LinguaOccultus too? then we can check the intersection)

(also increasing the duration that we disallow Youtube to scroll when auto-expanding the description (just to make sure): 2d07dc6 )

I am auto-expanding the videos description all the time an since I started to use this extension as it makes no sense to me to click on a button first and it does not make anything better to hide it.

I never used the theater mode.

My settings are the very same as before since we started this discussion; attached it again.

improvedtube.json

@Corruptinglyneedful
Copy link

hi again and thanks @LinguaOccultus @Corruptinglyneedful

@Corruptinglyneedful And you still don't auto-expand the video description? or theater mode? Please export your settings this time if you don't mind. (And @LinguaOccultus too? then we can check the intersection)

(also increasing the duration that we disallow Youtube to scroll when auto-expanding the description (just to make sure): 2d07dc6 )

Yah let me do that.
exported data for da bois.json

You can let me know or w/e.

@merlin555
Copy link
Author

merlin555 commented Oct 1, 2024

@LinguaOccultus

But the whole thing works for me with Vivaldi.
Maybe an expansion will bother you.
Here are my extensions and the uBlock settings.

Plugins

ublock-sicherung_2024-10-01_19.03.15.txt

@ImprovedTube
Copy link
Member

Then you neither made the extension open description, nor chapters , nor transcript? @Corruptinglyneedful? Might it only happened rarely when we live-chat:collapse runs?

@Corruptinglyneedful
Copy link

What? I don't understand. I gave my settings. That's what I use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥ YouTube changed
Projects
None yet
Development

No branches or pull requests

5 participants