You will need to install a user script manager extension to install this script.
This will get rid of those large "cards" that sometimes show up over the last ~20 seconds of videos. If the mouse cursor is not over the player, or if the player buttons have faded out, then the end cards will not show up. If you're in fullscreen mode, you can move the mouse to the left edge of the screen and the cards will instantly disappear.
This is mostly for music videos, where the record companies will ruin the endings of videos with ads for other stuff.
This is NOT for the wall of video links that show up after a video is over. This is only for links that show up while the video is still playing.