diff options
Diffstat (limited to 'recipes/drive')
-rw-r--r-- | recipes/drive/icon.svg | 1 | ||||
-rw-r--r-- | recipes/drive/index.js | 1 | ||||
-rw-r--r-- | recipes/drive/package.json | 11 | ||||
-rw-r--r-- | recipes/drive/service.css | 5 | ||||
-rw-r--r-- | recipes/drive/webview.js | 20 |
5 files changed, 38 insertions, 0 deletions
diff --git a/recipes/drive/icon.svg b/recipes/drive/icon.svg new file mode 100644 index 0000000..f161e6d --- /dev/null +++ b/recipes/drive/icon.svg | |||
@@ -0,0 +1 @@ | |||
<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg enable-background="new 0 0 128 128" id="Social_Icons" version="1.1" viewBox="0 0 128 128" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="_x33__stroke"><g id="Google_Drive"><rect clip-rule="evenodd" fill="none" fill-rule="evenodd" height="128" width="128"/><g id="Google_Drive_1_"><polygon clip-rule="evenodd" fill="#3777E3" fill-rule="evenodd" points="21.335,120 42.666,82.667 128,82.667 106.666,120 "/><polygon clip-rule="evenodd" fill="#FFCF63" fill-rule="evenodd" points="85.335,82.667 128,82.667 85.335,8 42.666,8 "/><polygon clip-rule="evenodd" fill="#11A861" fill-rule="evenodd" points="0,82.667 21.335,120 64,45.333 42.666,8 "/></g></g></g></svg> \ No newline at end of file | |||
diff --git a/recipes/drive/index.js b/recipes/drive/index.js new file mode 100644 index 0000000..23607bd --- /dev/null +++ b/recipes/drive/index.js | |||
@@ -0,0 +1 @@ | |||
module.exports = Ferdi => Ferdi; | |||
diff --git a/recipes/drive/package.json b/recipes/drive/package.json new file mode 100644 index 0000000..dd936f1 --- /dev/null +++ b/recipes/drive/package.json | |||
@@ -0,0 +1,11 @@ | |||
1 | { | ||
2 | "id": "drive", | ||
3 | "name": "Drive", | ||
4 | "version": "1.0.0", | ||
5 | "license": "MIT", | ||
6 | "repository": "https://github.com/gaspergrom/Franz-services", | ||
7 | "config": { | ||
8 | "serviceURL": "https://drive.google.com", | ||
9 | "hasNotificationSound": true | ||
10 | } | ||
11 | } | ||
diff --git a/recipes/drive/service.css b/recipes/drive/service.css new file mode 100644 index 0000000..2d8c1a6 --- /dev/null +++ b/recipes/drive/service.css | |||
@@ -0,0 +1,5 @@ | |||
1 | .app-wrapper-web .app { | ||
2 | width: 100% !important; | ||
3 | height: 100% !important; | ||
4 | top: 0 !important; | ||
5 | } | ||
diff --git a/recipes/drive/webview.js b/recipes/drive/webview.js new file mode 100644 index 0000000..ed32d8e --- /dev/null +++ b/recipes/drive/webview.js | |||
@@ -0,0 +1,20 @@ | |||
1 | const _path = _interopRequireDefault(require('path')); | ||
2 | |||
3 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
4 | |||
5 | module.exports = (Franz) => { | ||
6 | function getMessages() { | ||
7 | let direct = 0; | ||
8 | let indirect = 0; | ||
9 | const data = document.querySelector('#FranzMessages').dataset; | ||
10 | if (data) { | ||
11 | direct = data.direct; | ||
12 | indirect = data.indirect; | ||
13 | } | ||
14 | |||
15 | Franz.setBadge(direct, indirect); | ||
16 | } | ||
17 | |||
18 | Franz.loop(getMessages); | ||
19 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); | ||
20 | } | ||