You will need to install a user script manager extension to install this script.
When you're not signed into youtube, a popup opens automatically asking you to identify.
This userscript hides this dialog and auto-dismisses it.
It also takes care of the GDPR cookie dialog for those not using an extension to dismiss GDPR cookie warnings.
And it prevents those 2 dialogs from pausing/stopping the current video if one is playing.
As of version 0.4 there is no exception left. The userscript should prevent pausing and stopping by popups in all situations. (If you still encounter this problem, please report it)
Other smaller popups/dialogs are also dismissed. They are not hidden in case some are not noticed by the script. This is the reason you could still spot them for a short moment before they disappear.
Please report any problem.
I'm unable to test properly on smartphones, but it should work on the latest browsers. If you have a problem provide the version number of the browser you are using. I'll be able to simulate it and try to fix.
For more userscripts, styles, extensions, tips, ..., visit my programming page.