diff options
Diffstat (limited to 'recipes/yandex-mail')
-rw-r--r-- | recipes/yandex-mail/LICENSE | 21 | ||||
-rw-r--r-- | recipes/yandex-mail/icon.svg | 26 | ||||
-rw-r--r-- | recipes/yandex-mail/index.js | 1 | ||||
-rw-r--r-- | recipes/yandex-mail/package.json | 9 | ||||
-rw-r--r-- | recipes/yandex-mail/webview.js | 13 |
5 files changed, 70 insertions, 0 deletions
diff --git a/recipes/yandex-mail/LICENSE b/recipes/yandex-mail/LICENSE new file mode 100644 index 0000000..8abf7a7 --- /dev/null +++ b/recipes/yandex-mail/LICENSE | |||
@@ -0,0 +1,21 @@ | |||
1 | MIT License | ||
2 | |||
3 | Copyright (c) 2018 Mikhail Konovalov | ||
4 | |||
5 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
6 | of this software and associated documentation files (the "Software"), to deal | ||
7 | in the Software without restriction, including without limitation the rights | ||
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
9 | copies of the Software, and to permit persons to whom the Software is | ||
10 | furnished to do so, subject to the following conditions: | ||
11 | |||
12 | The above copyright notice and this permission notice shall be included in all | ||
13 | copies or substantial portions of the Software. | ||
14 | |||
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
21 | SOFTWARE. | ||
diff --git a/recipes/yandex-mail/icon.svg b/recipes/yandex-mail/icon.svg new file mode 100644 index 0000000..0ce362b --- /dev/null +++ b/recipes/yandex-mail/icon.svg | |||
@@ -0,0 +1,26 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | ||
3 | <!-- Creator: CorelDRAW X7 --> | ||
4 | <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="86.6986mm" height="86.6986mm" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd" | ||
5 | viewBox="0 0 8670 8670" | ||
6 | xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
7 | <defs> | ||
8 | <style type="text/css"> | ||
9 | <![CDATA[ | ||
10 | .fil3 {fill:none} | ||
11 | .fil2 {fill:#EE0000} | ||
12 | .fil1 {fill:#F2C202} | ||
13 | .fil0 {fill:#FFCC02} | ||
14 | ]]> | ||
15 | </style> | ||
16 | </defs> | ||
17 | <g id="Слой_x0020_1"> | ||
18 | <metadata id="CorelCorpID_0Corel-Layer"/> | ||
19 | <g id="_871737424"> | ||
20 | <polygon class="fil0" points="0,1106 8670,1106 8670,7564 0,7564 "/> | ||
21 | <path class="fil1" d="M0 7520l3858 -3353c262,-229 694,-227 959,4l3853 3349 0 44 -8670 0 0 -44z"/> | ||
22 | <path class="fil2" d="M8670 1129l-3856 3488c-263,239 -696,238 -961,-2l-3853 -3486 0 -23 8670 0 0 23z"/> | ||
23 | </g> | ||
24 | <rect class="fil3" width="8670" height="8670"/> | ||
25 | </g> | ||
26 | </svg> | ||
diff --git a/recipes/yandex-mail/index.js b/recipes/yandex-mail/index.js new file mode 100644 index 0000000..23607bd --- /dev/null +++ b/recipes/yandex-mail/index.js | |||
@@ -0,0 +1 @@ | |||
module.exports = Ferdi => Ferdi; | |||
diff --git a/recipes/yandex-mail/package.json b/recipes/yandex-mail/package.json new file mode 100644 index 0000000..356c1b9 --- /dev/null +++ b/recipes/yandex-mail/package.json | |||
@@ -0,0 +1,9 @@ | |||
1 | { | ||
2 | "id": "yandex-mail", | ||
3 | "name": "Yandex Mail", | ||
4 | "version": "1.0.0", | ||
5 | "license": "MIT", | ||
6 | "config": { | ||
7 | "serviceURL": "https://mail.yandex.ru" | ||
8 | } | ||
9 | } | ||
diff --git a/recipes/yandex-mail/webview.js b/recipes/yandex-mail/webview.js new file mode 100644 index 0000000..2c039a1 --- /dev/null +++ b/recipes/yandex-mail/webview.js | |||
@@ -0,0 +1,13 @@ | |||
1 | module.exports = Ferdi => { | ||
2 | const getMessages = function getMessages() { | ||
3 | let count = 0; | ||
4 | |||
5 | if (document.getElementsByClassName('mail-LabelList-Item_count').length > 1) { | ||
6 | count = Ferdi.safeParseInt(document.getElementsByClassName('mail-LabelList-Item_count')[1].textContent); | ||
7 | } | ||
8 | |||
9 | Ferdi.setBadge(count); | ||
10 | }; | ||
11 | |||
12 | Ferdi.loop(getMessages); | ||
13 | }; | ||