Snippets

Matthew Haley YouTube Pop Out Bookmarklet

Created by Matthew Haley last modified
(function() {
    document.URL.includes("https://www.youtube.com/watch") && (
        mp = document.getElementById("movie_player"),
        mp.pauseVideo(),
        ct = mp.getCurrentTime(),
        vid = mp.getVideoData().video_id,
        nl = "https://www.youtube.com/embed/" + vid,
        nl = nl.replace(/\&list=.*/,""),
        nl += "?autoplay=1&start=" + Math.round(ct),
        window.open(nl, "YouTube_WindowName", "width=800,height=527,menubar=no,location=yes,resizble=yes,scrollbars=no,status=no"));
})()

Comments (1)