The Source code of this KISS (Keep It Simple, Silly!) PHP script:
Explanation: We just use Youtube API Player parameters about this loop, and the trick is we to create "playlist": http://www.youtube.com/v/VIDEO_ID?autoplay=1&loop=1&playlist=VIDEO_ID
or: https://www.youtube.com/embed/VIDEO_ID?autoplay=1&loop=1&playlist=VIDEO_ID
Then there is a loop! And that's all! You can write the URL/Link in the Address Bar in your favorite Browser and will work too. Just change this VIDEO_ID ... I know it's not comfortable by this way :) When there is a playlist, then Youtube's player load next video automatically, and when we create two same videos, well there is Loop/Repeat mode. Look at the top left corner in Youtube player here to see the playlist with 2 same videos :)
But if you want create simple website service about Loop Youtube Videos like: www.loopvideos.com ; www.infinitelooper.com ; www.youtubeloop.net and others - feel free to use this simple php script :) no JavaScript needed :) There is problem with Firefox browser and Chrome. Firefox don't want play Flash and block this iframe with flash player. YouTube.com uses HTML5 Player now and there is 'Loop' function in the player - just right click on it.
You do not need to use any addons buttons and install them in your browser :) just no need of this :)
You can use my free web hosting and to upload this script there:
www.F1.al - Free Web Hosting
YouTubeLoop.eti.pw