forked from michaelwheeler/youtubepopout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
55 lines (46 loc) · 2.23 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html>
<head>
<title>YouTube Pop-up Bookmarklet</title>
<style>
body {
background: #eee;
margin: 0;
padding: 0;
font: 18px/24px Georgia, Serif;
color: #555;
}
h1 {
color: black;
font: bold 24px/24px Verdana, sans-serif;
text-shadow: 0 1px 0 white;
}
div {
margin: 20px auto;
min-width: 460px;
max-width: 720px;
width: 66%;
}
strong {
font-weight: bold;
color: black;
}
.btn {
font-family: Verdana, sans;
background: #ddd;
padding: 10px 20px;
border: 1px dashed #aaa;
}
</style>
</head>
<body>
<div>
<h1>YouTube Pop-up Bookmarklet</h1>
<p>For those who find themselves wanting to pop a YouTube video out into its own window, this is the tool for you. Using the bookmarklet below, you can pop a YouTube video out into a resizable window so you can watch it while working on something else.</p>
<p>To use the bookmarklet, simply <strong>drag the “YouTube Pop-Up” link below to your browser bookmark toolbar</strong> (or save it anywhere in your bookmarks or favorites). Then go to a YouTube video page and click on the new bookmark. If all goes well a new window should appear with the video inside. Currently the bookmarklet only works on YouTube single video pages like <a href="http://www.youtube.com/watch?v=9GRsQEMTt1Y">this one</a>, not other YouTube pages like channel pages.</p>
<p style="margin: 40px; text-align: center;"><a class="btn" href="javascript:ytplayer=window.yt.player&&window.yt.player.getPlayerByElement&&window.yt.player.getPlayerByElement(document.getElementById('player-api'));ytplayer.pauseVideo();void(window.open('http://www.youtube.com/embed/'+ytplayer.getVideoData().video_id+'?start='+Math.floor(ytplayer.getCurrentTime()),'_blank','height=345,width=560'))">YouTube Pop-Up</a></p>
<p>The bookmarklet was written by me, Michael Wheeler. If you find it helpful, let me know on <a href="https://twitter.com/wheelermichael">Twitter</a> or <a href="https://plus.google.com/113540717053225938334">Google+</a>. If you find a bug or have an improvement to suggest, please report it at the <a href="https://github.com/michaelwheeler/youtubepopout/issues">GitHub issue tracker</a>.</p>
<p>Thanks!</p>
</div>
</body>
</html>