YouTube as Embed Bookmarklet

I often watch YouTube videos in a separate window.

This bookmarklet opens the currently-playing video as an "embed", so the video takes up the size of the whole window.

It plays from the time the video is currently at.

Source (ethanbeyer.com)


Download Bookmarklet:


View Bookmarklet Code:

Bookmarklet Source Code:

javascript%3A%28function%28%29%7Bvar%20video_id%20%3D%20window.location.search.split%28%22v%3D%22%29%5B1%5D%3Bvar%20ampersandPosition%20%3D%20video_id.indexOf%28%22%26%22%29%3Bvar%20ytplayer%20%3D%20document.getElementById%28%22movie_player%22%29%3Bvar%20%24time%20%3D%20ytplayer.getCurrentTime%28%29%3B%24time%20%3D%20Math.round%28%24time%29%3Bif%28ampersandPosition%20%21%3D%20-1%29%20%7Bvideo_id%20%3D%20video_id.substring%280%2C%20ampersandPosition%29%3B%7Dwindow.location.assign%28%22http%3A//youtube.com/embed/%22%20+%20video_id%20+%20%22%3Fautoplay%3D1%26start%3D%22%20+%20%24time%29%3B%7D%29%28%29%3B


Rate it:


Tags:

Comments

Comments so far. Add yours.