aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/yandex-mail
diff options
context:
space:
mode:
authorLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2021-09-12 08:08:52 +0530
committerLibravatar GitHub <noreply@github.com>2021-09-12 02:38:52 +0000
commit416dbb944567306424fd02831e3f4f1dfeb71da1 (patch)
tree8526381354141b4b8b13d3fc41d811dc6556ac01 /recipes/yandex-mail
parentNew recipe: 'mewe' (fixes #484) (#684) (diff)
downloadferdium-recipes-416dbb944567306424fd02831e3f4f1dfeb71da1.tar.gz
ferdium-recipes-416dbb944567306424fd02831e3f4f1dfeb71da1.tar.zst
ferdium-recipes-416dbb944567306424fd02831e3f4f1dfeb71da1.zip
New recipe: 'yandex-mail' (fixes #421) (#685)
Diffstat (limited to 'recipes/yandex-mail')
-rw-r--r--recipes/yandex-mail/LICENSE21
-rw-r--r--recipes/yandex-mail/icon.svg26
-rw-r--r--recipes/yandex-mail/index.js1
-rw-r--r--recipes/yandex-mail/package.json9
-rw-r--r--recipes/yandex-mail/webview.js13
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 @@
1MIT License
2
3Copyright (c) 2018 Mikhail Konovalov
4
5Permission is hereby granted, free of charge, to any person obtaining a copy
6of this software and associated documentation files (the "Software"), to deal
7in the Software without restriction, including without limitation the rights
8to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9copies of the Software, and to permit persons to whom the Software is
10furnished to do so, subject to the following conditions:
11
12The above copyright notice and this permission notice shall be included in all
13copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21SOFTWARE.
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"
5viewBox="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 @@
1module.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};