You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<ahref="https://github.com/amarcu5/PiPer/issues">Report an issue</a>
17
+
</p>
18
+
19
+
***
5
20
6
21
## Contents
7
22
-[Features](#features)
8
23
-[Installation](#installation)
24
+
*[Safari](#safari)
25
+
*[Chrome](#chrome)
9
26
-[Supported sites](#supported-sites)
10
27
-[Changelog](#changelog)
11
28
-[Development](#development)
@@ -19,13 +36,18 @@ Adds Picture in Picture functionality to Safari for YouTube, Netflix, Amazon Vid
19
36
## Features
20
37
* Adds a dedicated Picture in Picture button to the video player of [supported sites](#supported-sites)
21
38
* Button integrates seamlessly with the player including hover effects and tooltips
22
-
* Supports closed captions in Picture and Picture mode
39
+
* Supports closed captions in Picture and Picture mode (Safari only)
40
+
* Supports Safari and Chrome
23
41
* Free and open source
24
42
25
43
## Installation
26
-
Get the latest release from the [Safari Extension Gallery](https://safari-extensions.apple.com/details/?id=com.amarcus.safari.piper-BQ6Q24MF9X)
27
-
28
-
<sub>...or live life on the edge with the latest [development build](https://rawgit.com/amarcu5/PiPer/develop/out/PiPer.safariextz) (IMPORTANT: these builds do not update automatically!)</sub>
44
+
### Safari
45
+
Install from the [Mac App Store](https://itunes.apple.com/app/id1421915518?mt=12&ls=1) by clicking "Get"
46
+
<sub>(The [Safari Extension Gallery](https://safari-extensions.apple.com/details/?id=com.amarcus.safari.piper-BQ6Q24MF9X) is now [deprecated](https://developer.apple.com/documentation/safariextensions))</sub>
47
+
### Chrome
48
+
Install from the [Chrome Web Store](https://chrome.google.com/webstore/detail/piper/jbjleapidaddpbncgofepljddfeoghkc) by clicking "Add to Chrome"
49
+
50
+
<sub>...or live life on the edge with the latest [development build](https://github.com/amarcu5/PiPer/tree/develop/out) (IMPORTANT: these builds do not update automatically!)</sub>
29
51
30
52
## Supported sites
31
53
*[Amazon Video](http://www.amazon.com/PrimeVideo)
@@ -71,30 +93,38 @@ You can find information about releases [here](https://github.com/amarcu5/PiPer/
71
93
### Building
72
94
73
95
#### Prerequisites
74
-
* Mac running macOS 10.12 Sierra or later
96
+
* Operating system
97
+
* macOS: 10.12 Sierra or newer (required to build Safari extension)
98
+
* Windows: Vista or newer using [Cygwin](https://cygwin.com/install.html)
99
+
* Linux: 64-bit Ubuntu 14.04+, Debian 8+, openSUSE 13.3+, or Fedora Linux 24+
For convenience the following Node.js tools have been packaged with [nexe](https://github.com/nexe/nexe) and included in this repository:
78
-
*[csso](https://github.com/css/csso)(3.1.1) for compressing CSS
79
-
*[svgo](https://github.com/svg/svgo)(0.7.2) for compressing SVG images
80
-
*[xarjs](https://github.com/robertknight/xar-js)(0.2.0) for packaging Safari extension
81
-
*[google-closure-compiler-js](https://github.com/google/closure-compiler-js) (20170806.0.0) for compiling JavaScript
106
+
The following build tools are used to build the extension:
107
+
*[csso](https://github.com/css/csso) for compressing CSS
108
+
*[svgo](https://github.com/svg/svgo) for compressing SVG images
109
+
*[xarjs](https://github.com/robertknight/xar-js) for packaging Safari legacy extension
110
+
*[google-closure-compiler](https://github.com/google/closure-compiler) for compiling JavaScript
82
111
83
-
However it is recommended to install the latest versions with [Node.js](https://nodejs.org):
112
+
These can be installed by executing the following command:
84
113
```Shell
85
114
npm install -g csso-cli
86
115
npm install -g svgo
87
116
npm install -g xar-js
88
-
npm install -g google-closure-compiler-js
117
+
npm install -g google-closure-compiler
89
118
```
90
119
91
-
Additionally a reimplementation of the utility PlistBuddy used for automated build numbering is [provided](https://github.com/amarcu5/PiPer/tree/master/build-tools/) but it is advisable to download the original as part of [Xcode](https://itunes.apple.com/gb/app/xcode/id497799835?mt=12) or from [Apple's Command Line Tools](https://developer.apple.com/download/)
92
-
93
120
#### Steps
94
121
1. Clone the repository
95
122
2. Run `make.sh`
96
-
1. By default this builds the unoptimized and unpackaged development version into the `./out/` directory that can then be installed using Safari's Extension Builder
97
-
2. Alternatively run `./make.sh -p release` to build the optimized and packaged release version (note that packaging requires a private key)
123
+
1. By default this builds the unoptimized and unpackaged development version for all targets into the `./out/` directory
124
+
2. Alternatively:
125
+
*`./make.sh -p release` to build the optimized release versions for all targets
126
+
*`./make.sh -p release -t chrome` to build the optimized release version for the Chrome browser
127
+
*`./make.sh -h` to see the full list of options
98
128
99
129
### Supporting a new site
100
130
If we wanted to support `example.com` with the source:
@@ -110,73 +140,46 @@ If we wanted to support `example.com` with the source:
110
140
</div>
111
141
</div>
112
142
```
113
-
We would start by adding a new entry in the `resources` object in `main.js`:
143
+
We would start by adding a new file `example.js` in the [resources directory](https://github.com/amarcu5/PiPer/tree/master/src/common/scripts/resources):
114
144
```JavaScript
115
-
constresources= {
116
-
...
117
-
'example': {
118
-
buttonParent:function() {
119
-
// Returns the element that will contain the button
0 commit comments