Stop YouTube video suggestions in embaded mode
by azmainmahtab97 Updated: Dec 13, 2022
Guide Kit
For an embaded link you will get a snipet like this:
"<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/ESBrUXjBCF8?rel=0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>"
add "?rel=0" at the end of the src link and the player won't sho suggested videos when paused.
To stop all the suggestin after the video ends:
- for(element of document.getElementsByClassName('ytp-ce-element')) { element.style.display = 'none'; }