Skip to content

Commit c318d9c

Browse files
committed
Draw button below full screen video
Fixes #64
1 parent fd382a6 commit c318d9c

6 files changed

+54
-37
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
pkg
22
lib
3+
node_modules

README.md

+16-20
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,41 @@
1-
Popout for YouTube™
2-
===================
1+
# Popout for YouTube™
32

43
An extension for Google Chrome™ that adds a button to videos on youtube.com to
54
"pop out" the video into a new window. Uses jQuery.
65

7-
Download and Install
8-
--------------------
6+
## Download and Install
97

108
Download and install via the [Chrome Web
119
Store](https://chrome.google.com/webstore/detail/pofekaindcmmojfnfgbpklepkjfilcep).
1210

13-
Implementation
14-
--------------
11+
## Implementation
1512

1613
Popout for YouTube™ is written in [CoffeeScript](http://coffeescript.org). The
1714
source code is managed on GitHub at
1815
http://github.com/sidewaysmilk/popout_for_youtube .
1916

20-
Development Requirements
21-
------------------------
17+
## Development Requirements
2218

23-
You need CoffeeScript and zip support to build it. If you have the bins
24-
`coffee`, `cake`, and `zip`, you're good to go.
19+
You need a `zip` bin in your path and yarn or npm.
2520

26-
Compiling
27-
---------
21+
```sh
22+
yarn install
23+
```
2824

29-
Run `cake` for a list of tasks. These are the big ones.
25+
## Compiling
3026

31-
* `cake build` to compile
32-
* `cake zip` runs `cake build` then prepares the Chrome extension as a zip file
27+
Run `yarn run` for a list of tasks. These are the big ones.
3328

34-
Contributions
35-
-------------
29+
- `yarn build` - compiles the CoffeeScript to JavaScript
30+
- `yarn zip` - `yarn build` then prepares the Chrome extension as a zip file
31+
32+
## Contributions
3633

3734
Thanks to the following developers for their contributions to the project!
3835

39-
* [sjb933][] - [#46][pr46]
36+
- [sjb933][] - [#46][pr46]
4037

41-
Copyright and License
42-
---------------------
38+
## Copyright and License
4339

4440
Copyright © 2010-2014, Justin Force - Licensed under the MIT License
4541

manifest.json

+4-14
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,13 @@
1111
],
1212
"content_security_policy": "script-src 'unsafe-eval' 'self' https://www.youtube.com https://s.ytimg.com https://ssl.google-analytics.com; object-src 'self'",
1313
"background": {
14-
"scripts": [
15-
"analytics.js",
16-
"lib/background.js"
17-
]
14+
"scripts": ["analytics.js", "lib/background.js"]
1815
},
1916
"content_scripts": [
2017
{
21-
"matches": [
22-
"http://www.youtube.com/*",
23-
"https://www.youtube.com/*"
24-
],
25-
"js": [
26-
"lib/popout_for_youtube.js"
27-
],
28-
"css": [
29-
"popout_for_youtube.css"
30-
]
18+
"matches": ["http://www.youtube.com/*", "https://www.youtube.com/*"],
19+
"js": ["lib/popout_for_youtube.js"],
20+
"css": ["popout_for_youtube.css"]
3121
}
3222
],
3323
"icons": {

package.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"devDependencies": {
3+
"coffeescript": "^2.3.2"
4+
},
5+
"scripts": {
6+
"build": "cake build",
7+
"watch": "cake watch",
8+
"zip": "cake zip"
9+
}
10+
}

popout_for_youtube.css

+15-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
.popout-for-youtube__button {
2-
transition: visibility 0s, opacity 350ms ease-in; /* [v] visibility animation */
32
outline: none;
43
text-indent: -999em;
54
width: 29px;
65
height: 29px;
76
position: absolute;
8-
z-index: 9999; /* [z] Ensure button is below video */
97
cursor: pointer;
108
border-style: none;
119
background-color: transparent;
@@ -14,6 +12,16 @@
1412

1513
/* Base64 encoded images/icon29.png */
1614
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAdCAYAAABWk2cPAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAARvSURBVEiJvZdfSFtXHMe/53jun7SrA4dZ1Aajk0QiMhm0dpK6hw1LGD4IhVVaOoobyNje7P4x2IsM1m1MBoW1zIchfdcy0Mi2ihP/IAhbdKJLnEqmi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uBihUAgjIyN5g9bX10U8Hh+nlO4YhrE9NTX1bSAQmAAQFUJwSygASJKEkpISFBUVner9DgwM8N7e3o7x8fF5ACaAbQC62G/AKKVC13XTNE1mFZ+iKFAUJW+njDFOCFkSQsRy7dNUKqUvLy+PLi0t5d30OMViMUSj0eWFhYVNy0NFIhFtbGzsI6fT+f3a2pri8XjoaVwdyDAMhMNhPjc3p09OTn4cjUY1q1oihAAhRCorK6tobm5ur66uvsoYk08LFUKYi4uLgUAg0DU9PT0vhEgdCwXSX4NnnU5noaIop74blFIRi8XiGxsbiYO/D1b6Bzux4YozW0teAAAAAElFTkSuQmCC);
15+
16+
/*
17+
* [z] Ensure button is below video. Should be higher than
18+
* #masthead-container and lower than video.
19+
* #masthead-container z-index is 2020 as of Dec 3, 2018.
20+
*/
21+
z-index: 2050;
22+
23+
/* [v] visibility animation */
24+
transition: visibility 0s, opacity 350ms ease-in;
1725
}
1826

1927
.popout-for-youtube__button--hidden {
@@ -23,5 +31,9 @@
2331
}
2432

2533
video {
26-
z-index: 10000; /* [z] Ensure button is below video */
34+
/*
35+
* [z] Ensure button is below video. Make this higher than
36+
* .popout-for-youtube__button
37+
*/
38+
z-index: 3000;
2739
}

yarn.lock

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+
5+
coffeescript@^2.3.2:
6+
version "2.3.2"
7+
resolved "https://registry.yarnpkg.com/coffeescript/-/coffeescript-2.3.2.tgz#e854a7020dfe47b7cf4dd412042e32ef1e269810"
8+
integrity sha512-YObiFDoukx7qPBi/K0kUKyntEZDfBQiqs/DbrR1xzASKOBjGT7auD85/DiPeRr9k++lRj7l3uA9TNMLfyfcD/Q==

0 commit comments

Comments
 (0)