aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar sulthankarimov <sakarimov@users.noreply.github.com>2024-05-09 10:06:07 +0700
committerLibravatar GitHub <noreply@github.com>2024-05-09 08:36:07 +0530
commit5f86784ab1b38e07824ab5238b82fb66186a6985 (patch)
tree566d9066d6f1d75ebbe241de7614eedc613d64b8
parentadd sakarimov as a contributor for code [skip ci] (#545) (diff)
downloadferdium-recipes-5f86784ab1b38e07824ab5238b82fb66186a6985.tar.gz
ferdium-recipes-5f86784ab1b38e07824ab5238b82fb66186a6985.tar.zst
ferdium-recipes-5f86784ab1b38e07824ab5238b82fb66186a6985.zip
add upwork recipe (#547)
-rw-r--r--recipes/upwork/icon.svg45
-rw-r--r--recipes/upwork/index.js1
-rw-r--r--recipes/upwork/package.json9
-rw-r--r--recipes/upwork/webview.js17
4 files changed, 72 insertions, 0 deletions
diff --git a/recipes/upwork/icon.svg b/recipes/upwork/icon.svg
new file mode 100644
index 0000000..f94e0e4
--- /dev/null
+++ b/recipes/upwork/icon.svg
@@ -0,0 +1,45 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<svg
3 height="2500"
4 viewBox="0.26 -0.21 500.40032 500"
5 width="2500"
6 version="1.1"
7 id="svg2"
8 sodipodi:docname="icon.svg"
9 inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)"
10 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
11 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
12 xmlns="http://www.w3.org/2000/svg"
13 xmlns:svg="http://www.w3.org/2000/svg">
14 <defs
15 id="defs2" />
16 <sodipodi:namedview
17 id="namedview2"
18 pagecolor="#ffffff"
19 bordercolor="#000000"
20 borderopacity="0.25"
21 inkscape:showpageshadow="2"
22 inkscape:pageopacity="0.0"
23 inkscape:pagecheckerboard="0"
24 inkscape:deskcolor="#d1d1d1"
25 inkscape:zoom="0.1668"
26 inkscape:cx="1297.9616"
27 inkscape:cy="983.21343"
28 inkscape:window-width="1908"
29 inkscape:window-height="1038"
30 inkscape:window-x="4"
31 inkscape:window-y="34"
32 inkscape:window-maximized="1"
33 inkscape:current-layer="svg2" />
34 <rect
35 style="fill:#14a800;fill-opacity:1;stroke:#000000;stroke-width:0"
36 id="rect2"
37 width="500.32037"
38 height="500.32037"
39 x="0.09981323"
40 y="-0.37018678" />
41 <path
42 d="m 359.92,303.51 c -31.11,0 -51.69,-24.01 -57.45,-33.35 7.36,-59.01 28.93,-77.61 57.45,-77.61 28.18,0 50.13,22.53 50.13,55.48 0,32.95 -21.95,55.48 -50.13,55.48 m 0,-147.18 c -50.71,0 -79.13,33.07 -87.25,67.12 -9.24,-17.34 -16.04,-40.54 -21.4,-62.1 h -70.09 v 87.24 c 0,31.7 -14.38,55.07 -42.59,55.07 -28.21,0 -44.37,-23.37 -44.37,-55.06 l 0.3,-87.25 h -40.4 v 87.24 c 0,25.47 8.26,48.56 23.26,65.04 15.48,16.98 36.64,25.95 61.19,25.95 48.78,0 82.81,-37.41 82.81,-90.96 V 190 c 5.14,19.29 17.2,56.39 40.41,88.92 l -21.68,123.44 h 41.08 l 14.31,-87.52 c 4.7,3.89 9.68,7.41 14.9,10.55 a 90.604,90.604 0 0 0 45.69,14.09 h 0.08 c 1.21,0 2.44,0.07 3.69,0.07 50.29,0 90.34,-38.94 90.34,-91.43 0.01,-52.52 -40,-91.79 -90.28,-91.79"
43 fill="#ffffff"
44 id="path2" />
45</svg>
diff --git a/recipes/upwork/index.js b/recipes/upwork/index.js
new file mode 100644
index 0000000..dd41f72
--- /dev/null
+++ b/recipes/upwork/index.js
@@ -0,0 +1 @@
module.exports = Ferdium => Ferdium;
diff --git a/recipes/upwork/package.json b/recipes/upwork/package.json
new file mode 100644
index 0000000..ea45045
--- /dev/null
+++ b/recipes/upwork/package.json
@@ -0,0 +1,9 @@
1{
2 "id": "upwork",
3 "name": "upwork",
4 "version": "1.0.0",
5 "license": "MIT",
6 "config": {
7 "serviceURL": "https://www.upwork.com/ab/notifications/"
8 }
9}
diff --git a/recipes/upwork/webview.js b/recipes/upwork/webview.js
new file mode 100644
index 0000000..6a2492c
--- /dev/null
+++ b/recipes/upwork/webview.js
@@ -0,0 +1,17 @@
1function _interopRequireDefault(obj) {
2 return obj && obj.__esModule ? obj : { default: obj };
3}
4
5const _path = _interopRequireDefault(require('path'));
6
7module.exports = Ferdium => {
8 const getMessages = () => {
9 const directMessages = $('li .notification-row .d-inline-block')?.textContent;
10
11 Ferdium.setBadge(directMessages);
12 };
13
14 Ferdium.loop(getMessages);
15
16 Ferdium.injectCSS(_path.default.join(__dirname, 'service.css'));
17};