Greasy Fork is available in English.

討論 » 建立請求

Stop youtube from asking for account creation with a script

§
發表於:2020-09-20

Im accessing youtube from the EU. Recently something got changed and whenever I want to watch a video it stops after a few seconds and the screen turns grey. Im using uBlock origin to block ads and my browser is set to delete cookies when closed. I dont want to change any of these but instead solve the problem using a script. I found out that when uBlock is disabled, youtube turns the screen grey and opens a popup asking for account creation. So this seems to be causing my problem. I want to create a script that makes sure youtube does not stop any video from playing when it tries to create that popup and block the popup aswell. However I know too little about coding and this case would probably take me a very long time to figure out. It would be nice if someone could help me on this.

If I try something like this, the video does not get interrupted but most of the website stops working:

(function() {
'use strict';

window.addEventListener('beforescriptexecute',
function(event) {
var originalScript = event.target;
if(/s\/desktop\/aa71f599/.test(originalScript.src))
{
originalScript.parentNode.removeChild(originalScript);
event.preventDefault();
}
}
);

})();

Im sure there is a much better way of solving the problem.

§
發表於:2020-09-20

I tried to use vpn to make youtube think that I'm in Europe, but I didn't see what you said.

Give me some links where that happens with you to see if I will get the same thing using vpn.

You probably won't get help because you need to find someone that knows js and lives in europe, I'm not sure if vpn will work but I can try if you give me the links.

§
發表於:2020-09-20

First off, thank you for trying to help me.
It happens on all videos not just selected ones. Maybe you could not reproduce the issue because you already have a certain cookie set by youtube/google. You could try to delete your cookies first if that is not too inconvenient for you. Also make sure you are not logged in / auto- logged in into an youtube or google account. I can give you a random video link but I dont think that helps (https://www.youtube.com/watch?v=8h0DMAvcuN0). I will try changing my browser settings to english and see what happens.

§
發表於:2020-09-20
編輯:2020-09-20

I did that and I didn't see what you said so I can't help you... sorry

I think that this is your browser/OS problem. If youtube asked every EU living user beings to login to be able to watch YT videos, that would be on world wide news I think, but I haven't read any news saying that...

§
發表於:2020-09-20

Its a 'recommendation' that you can decline. youtube will then place a cookie that will remember your decision. The problem exists only for people who both use uBlock origin and checked the box in browser settings that reads 'delete cookies when the browser is closed'. People who use default browser settings without add-ons rarely have any trouble with popular websites, so this is not about 'every EU living user beings'.

If the browser settings checkbox is unchecked, you only need to decline that popup once and will never see it again. If uBlock origin is deactivated, you will only get a problem on the first video you try to watch until you close the browser again. If both are disabled there are no problems. But as I stated in my initial comment, I dont want to sacrifice either of them to solve the issue, because I think it can be solved using a script.

§
發表於:2020-09-20
編輯:2020-09-20

I use uBlock origin and checked the box in browser settings that reads 'delete cookies when the browser is closed'.
I even tried using other browser without any add-ons besides ublock origin and tampermonkey without any scripts installed.

I clean my browser cookies and everything else every single time.

Are you talking about the really small "become a premium YT user" pop up? I can see that on the left bottom side of the screen, but that is small, isn't grey and doesn't require me to login, neither stops YT videos.

Show prints so I and others can understand better

§
發表於:2020-09-20

https://imgur.com/a/RHc0RLO

It seems that uBlock removes the popup by default but does not remove the obfuscation so the website stays unresponsive.

§
發表於:2020-09-20

I've never seen that.

I used another browser with ublock activated and deactivated but without the vpn, and I didn't see that screen.

That might be an ublock origin bug. You can try to resetting all your ublock configs, or uninstall the extension and install again to see if yt will work. If you contact the dev he will probably try to help you too.

§
發表於:2020-09-20

I made some progress.
The difference between uBlock active / deactivated is caused by an old custom filter from 2019. I removed it and now the popup appears in both situations. I still need to get rid of it though.

§
發表於:2020-09-20
編輯:2020-09-20

I need to correct some information. When deleting cookies is disabled I still get those popups on every single video. I lowered all security options on my browser (firefox) and disabled all add-ons yet they still appear all over the place. Thats ridiculous.

§
發表於:2020-09-21

Yes it is...
You can try resetting your firefox or using another browser.

I've no idea how I can help you.

Do you want to teamviewer?

§
發表於:2020-09-21

I should have done more internet research before posting. The problem has already been discussed on several forums and a few possible solutions already exist.

https://github.com/uBlockOrigin/uAssets/issues/7842
https://stackoverflow.com/questions/63680896/how-to-block-the-annoying-sign-in-to-youtube-popup/63803884#63803884

§
發表於:2020-09-22

nice

發表回覆

登入以回復