diff options
author | vantezzen <hello@vantezzen.io> | 2020-05-10 10:41:58 +0200 |
---|---|---|
committer | vantezzen <hello@vantezzen.io> | 2020-05-10 10:41:58 +0200 |
commit | d927902163200b9ab30f27a9d7919abf0811c727 (patch) | |
tree | 237c8b657811d30f014aca8b414319d5eef17e74 | |
parent | Add create script (diff) | |
parent | Merge pull request #153 from dnlnrs/master (diff) | |
download | ferdium-recipes-d927902163200b9ab30f27a9d7919abf0811c727.tar.gz ferdium-recipes-d927902163200b9ab30f27a9d7919abf0811c727.tar.zst ferdium-recipes-d927902163200b9ab30f27a9d7919abf0811c727.zip |
Merge branch 'master' of https://github.com/getferdi/recipes
29 files changed, 205 insertions, 39 deletions
@@ -88,8 +88,19 @@ | |||
88 | } | 88 | } |
89 | }, | 89 | }, |
90 | { | 90 | { |
91 | "author": "Stefan Malzner <stefan@adlk.io>", | 91 | "author": "Daniele Lenares <daniele.lenares@gmail.com>", |
92 | "featured": false, | 92 | "featured": false, |
93 | "id": "clubhouse", | ||
94 | "name": "Clubhouse", | ||
95 | "version": "1.0.1", | ||
96 | "icons": { | ||
97 | "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/clubhouse/icon.png", | ||
98 | "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/clubhouse/icon.svg" | ||
99 | } | ||
100 | }, | ||
101 | { | ||
102 | "author": "Stefan Malzner <stefan@adlk.io>", | ||
103 | "featured": true, | ||
93 | "id": "discord", | 104 | "id": "discord", |
94 | "name": "Discord", | 105 | "name": "Discord", |
95 | "version": "1.1.3", | 106 | "version": "1.1.3", |
@@ -210,7 +221,7 @@ | |||
210 | }, | 221 | }, |
211 | { | 222 | { |
212 | "author": "Brian Gilbert <brian@briangilbert.net>", | 223 | "author": "Brian Gilbert <brian@briangilbert.net>", |
213 | "featured": false, | 224 | "featured": true, |
214 | "id": "gitter", | 225 | "id": "gitter", |
215 | "name": "Gitter", | 226 | "name": "Gitter", |
216 | "version": "1.0.2", | 227 | "version": "1.0.2", |
@@ -232,7 +243,7 @@ | |||
232 | }, | 243 | }, |
233 | { | 244 | { |
234 | "author": "Stefan Malzner <stefan@adlk.io>", | 245 | "author": "Stefan Malzner <stefan@adlk.io>", |
235 | "featured": false, | 246 | "featured": true, |
236 | "id": "gmail", | 247 | "id": "gmail", |
237 | "name": "Gmail", | 248 | "name": "Gmail", |
238 | "version": "1.3.1", | 249 | "version": "1.3.1", |
@@ -308,6 +319,17 @@ | |||
308 | } | 319 | } |
309 | }, | 320 | }, |
310 | { | 321 | { |
322 | "author": "Jake Lee <ferdi@jakelee.co.uk>", | ||
323 | "featured": false, | ||
324 | "id": "guilded", | ||
325 | "name": "Guilded", | ||
326 | "version": "1.0.0", | ||
327 | "icons": { | ||
328 | "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/guilded/icon.png", | ||
329 | "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/guilded/icon.svg" | ||
330 | } | ||
331 | }, | ||
332 | { | ||
311 | "author": "Yuriy Badalyantc <lmnet89@gmail.com>", | 333 | "author": "Yuriy Badalyantc <lmnet89@gmail.com>", |
312 | "featured": false, | 334 | "featured": false, |
313 | "id": "habitica", | 335 | "id": "habitica", |
@@ -331,10 +353,10 @@ | |||
331 | }, | 353 | }, |
332 | { | 354 | { |
333 | "author": "Stefan Malzner <stefan@adlk.io>", | 355 | "author": "Stefan Malzner <stefan@adlk.io>", |
334 | "featured": false, | 356 | "featured": true, |
335 | "id": "hangouts", | 357 | "id": "hangouts", |
336 | "name": "Hangouts", | 358 | "name": "Hangouts", |
337 | "version": "1.0.2", | 359 | "version": "1.0.4", |
338 | "icons": { | 360 | "icons": { |
339 | "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/hangouts/icon.png", | 361 | "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/hangouts/icon.png", |
340 | "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/hangouts/icon.svg" | 362 | "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/hangouts/icon.svg" |
@@ -345,7 +367,7 @@ | |||
345 | "featured": false, | 367 | "featured": false, |
346 | "id": "hangoutschat", | 368 | "id": "hangoutschat", |
347 | "name": "Hangouts Chat", | 369 | "name": "Hangouts Chat", |
348 | "version": "1.2.3", | 370 | "version": "1.3.0", |
349 | "icons": { | 371 | "icons": { |
350 | "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/hangoutschat/icon.png", | 372 | "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/hangoutschat/icon.png", |
351 | "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/hangoutschat/icon.svg" | 373 | "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/hangoutschat/icon.svg" |
@@ -474,7 +496,7 @@ | |||
474 | }, | 496 | }, |
475 | { | 497 | { |
476 | "author": "Stefan Malzner <stefan@adlk.io>", | 498 | "author": "Stefan Malzner <stefan@adlk.io>", |
477 | "featured": false, | 499 | "featured": true, |
478 | "id": "mattermost", | 500 | "id": "mattermost", |
479 | "name": "Mattermost", | 501 | "name": "Mattermost", |
480 | "version": "1.2.1", | 502 | "version": "1.2.1", |
@@ -485,7 +507,7 @@ | |||
485 | }, | 507 | }, |
486 | { | 508 | { |
487 | "author": "Stefan Malzner <stefan@adlk.io>", | 509 | "author": "Stefan Malzner <stefan@adlk.io>", |
488 | "featured": false, | 510 | "featured": true, |
489 | "id": "messenger", | 511 | "id": "messenger", |
490 | "name": "Messenger", | 512 | "name": "Messenger", |
491 | "version": "1.1.0", | 513 | "version": "1.1.0", |
@@ -694,7 +716,7 @@ | |||
694 | }, | 716 | }, |
695 | { | 717 | { |
696 | "author": "Stefan Malzner <stefan@adlk.io>", | 718 | "author": "Stefan Malzner <stefan@adlk.io>", |
697 | "featured": false, | 719 | "featured": true, |
698 | "id": "rocketchat", | 720 | "id": "rocketchat", |
699 | "name": "Rocket.Chat", | 721 | "name": "Rocket.Chat", |
700 | "version": "1.0.6", | 722 | "version": "1.0.6", |
@@ -727,7 +749,7 @@ | |||
727 | }, | 749 | }, |
728 | { | 750 | { |
729 | "author": "Stefan Malzner <stefan@adlk.io>", | 751 | "author": "Stefan Malzner <stefan@adlk.io>", |
730 | "featured": false, | 752 | "featured": true, |
731 | "id": "skype", | 753 | "id": "skype", |
732 | "name": "Skype", | 754 | "name": "Skype", |
733 | "version": "1.3.0", | 755 | "version": "1.3.0", |
@@ -738,7 +760,7 @@ | |||
738 | }, | 760 | }, |
739 | { | 761 | { |
740 | "author": "Stefan Malzner <stefan@adlk.io>", | 762 | "author": "Stefan Malzner <stefan@adlk.io>", |
741 | "featured": false, | 763 | "featured": true, |
742 | "id": "slack", | 764 | "id": "slack", |
743 | "name": "Slack", | 765 | "name": "Slack", |
744 | "version": "1.0.15", | 766 | "version": "1.0.15", |
@@ -804,7 +826,7 @@ | |||
804 | }, | 826 | }, |
805 | { | 827 | { |
806 | "author": "Stefan Malzner <stefan@adlk.io>", | 828 | "author": "Stefan Malzner <stefan@adlk.io>", |
807 | "featured": false, | 829 | "featured": true, |
808 | "id": "telegram", | 830 | "id": "telegram", |
809 | "name": "Telegram", | 831 | "name": "Telegram", |
810 | "version": "3.0.0", | 832 | "version": "3.0.0", |
@@ -881,7 +903,7 @@ | |||
881 | }, | 903 | }, |
882 | { | 904 | { |
883 | "author": "Stefan Malzner <stefan@adlk.io>", | 905 | "author": "Stefan Malzner <stefan@adlk.io>", |
884 | "featured": false, | 906 | "featured": true, |
885 | "id": "tweetdeck", | 907 | "id": "tweetdeck", |
886 | "name": "Tweetdeck", | 908 | "name": "Tweetdeck", |
887 | "version": "1.0.2", | 909 | "version": "1.0.2", |
@@ -980,10 +1002,10 @@ | |||
980 | }, | 1002 | }, |
981 | { | 1003 | { |
982 | "author": "Stefan Malzner <stefan@adlk.io>", | 1004 | "author": "Stefan Malzner <stefan@adlk.io>", |
983 | "featured": false, | 1005 | "featured": true, |
984 | "id": "whatsapp", | 1006 | "id": "whatsapp", |
985 | "name": "WhatsApp", | 1007 | "name": "WhatsApp", |
986 | "version": "2.0.2", | 1008 | "version": "2.0.3", |
987 | "icons": { | 1009 | "icons": { |
988 | "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/whatsapp/icon.png", | 1010 | "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/whatsapp/icon.png", |
989 | "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/whatsapp/icon.svg" | 1011 | "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/whatsapp/icon.svg" |
@@ -1049,7 +1071,7 @@ | |||
1049 | "featured": false, | 1071 | "featured": false, |
1050 | "id": "zalo", | 1072 | "id": "zalo", |
1051 | "name": "Zalo", | 1073 | "name": "Zalo", |
1052 | "version": "1.0.0", | 1074 | "version": "1.1.1", |
1053 | "icons": { | 1075 | "icons": { |
1054 | "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/zalo/icon.png", | 1076 | "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/zalo/icon.png", |
1055 | "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/zalo/icon.svg" | 1077 | "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/zalo/icon.svg" |
diff --git a/archives/clubhouse.tar.gz b/archives/clubhouse.tar.gz new file mode 100644 index 0000000..53f91f3 --- /dev/null +++ b/archives/clubhouse.tar.gz | |||
Binary files differ | |||
diff --git a/archives/guilded.tar.gz b/archives/guilded.tar.gz new file mode 100644 index 0000000..70a7e45 --- /dev/null +++ b/archives/guilded.tar.gz | |||
Binary files differ | |||
diff --git a/archives/hangouts.tar.gz b/archives/hangouts.tar.gz index 8ae4470..d53b779 100644 --- a/archives/hangouts.tar.gz +++ b/archives/hangouts.tar.gz | |||
Binary files differ | |||
diff --git a/archives/hangoutschat.tar.gz b/archives/hangoutschat.tar.gz index b1fdc9c..4163cb5 100644 --- a/archives/hangoutschat.tar.gz +++ b/archives/hangoutschat.tar.gz | |||
Binary files differ | |||
diff --git a/archives/whatsapp.tar.gz b/archives/whatsapp.tar.gz index a15e4f2..1d48d3a 100644 --- a/archives/whatsapp.tar.gz +++ b/archives/whatsapp.tar.gz | |||
Binary files differ | |||
diff --git a/archives/zalo.tar.gz b/archives/zalo.tar.gz index d3a5f6c..c11f022 100644 --- a/archives/zalo.tar.gz +++ b/archives/zalo.tar.gz | |||
Binary files differ | |||
diff --git a/docs/backend_api.md b/docs/backend_api.md index 512912b..dc3bfaa 100644 --- a/docs/backend_api.md +++ b/docs/backend_api.md | |||
@@ -5,6 +5,7 @@ Provides a set of helper functions to integrate the recipe into [Ferdi](https:// | |||
5 | ## Ferdi Backend Class Methods | 5 | ## Ferdi Backend Class Methods |
6 | * [validateUrl](#user-content-validateurl) | 6 | * [validateUrl](#user-content-validateurl) |
7 | * [overrideUserAgent](#user-content-overrideuseragent) | 7 | * [overrideUserAgent](#user-content-overrideuseragent) |
8 | * [modifyRequestHeaders](#user-content-modifyrequestheaders) | ||
8 | 9 | ||
9 | ## Events | 10 | ## Events |
10 | * [webview events](#user-content-events) | 11 | * [webview events](#user-content-events) |
@@ -72,6 +73,32 @@ module.exports = Ferdi => class Example extends Ferdi { | |||
72 | }; | 73 | }; |
73 | ``` | 74 | ``` |
74 | 75 | ||
76 | ### modifyRequestHeaders() | ||
77 | Modify headers of HTTP requests sent from a recipe's webview | ||
78 | Any standard HTTP header can be added to the requests. | ||
79 | |||
80 | #### Returns | ||
81 | `Array` containing objects, each of which should have two properties. | ||
82 | - `headers` - Object containing the header params and their values in key-value format | ||
83 | - `requestFilters` - Array of URL patterns used to filter requests for which the headers need to be added. | ||
84 | Valid URL patterns can be referred from [here](https://www.electronjs.org/docs/api/web-request#webrequestonbeforerequestfilter-listener) | ||
85 | |||
86 | #### Usage | ||
87 | |||
88 | ```js | ||
89 | // Hangouts Chat integration | ||
90 | module.exports = Ferdi => class HangoutsChat extends Ferdi { | ||
91 | modifyRequestHeaders() { | ||
92 | return [{ | ||
93 | // Adding an origin header for all http requests from this recipe | ||
94 | headers: { 'origin': 'https://chat.google.com' }, | ||
95 | requestFilters: { | ||
96 | urls: ['*://*/*'] | ||
97 | } | ||
98 | }] | ||
99 | } | ||
100 | }; | ||
101 | ``` | ||
75 | 102 | ||
76 | ### Events | 103 | ### Events |
77 | Ferdi recipes can hook into the [electron webview events](https://electron.atom.io/docs/api/webview-tag/#dom-events) to trigger custom functions. | 104 | Ferdi recipes can hook into the [electron webview events](https://electron.atom.io/docs/api/webview-tag/#dom-events) to trigger custom functions. |
@@ -95,3 +122,4 @@ module.exports = Ferdi => class Tweetdeck extends Ferdi { | |||
95 | } | 122 | } |
96 | }; | 123 | }; |
97 | ``` | 124 | ``` |
125 | |||
diff --git a/uncompressed/clubhouse/.gitignore b/uncompressed/clubhouse/.gitignore new file mode 100644 index 0000000..e026003 --- /dev/null +++ b/uncompressed/clubhouse/.gitignore | |||
@@ -0,0 +1,3 @@ | |||
1 | .DS_Store | ||
2 | .idea | ||
3 | .vscode \ No newline at end of file | ||
diff --git a/uncompressed/clubhouse/README.md b/uncompressed/clubhouse/README.md new file mode 100644 index 0000000..3066666 --- /dev/null +++ b/uncompressed/clubhouse/README.md | |||
@@ -0,0 +1,2 @@ | |||
1 | # Clubhouse for Franz | ||
2 | This is a community Ferdi recipe for [Clubhouse](https://clubhouse.io) | ||
diff --git a/uncompressed/clubhouse/icon.png b/uncompressed/clubhouse/icon.png new file mode 100644 index 0000000..c91b19f --- /dev/null +++ b/uncompressed/clubhouse/icon.png | |||
Binary files differ | |||
diff --git a/uncompressed/clubhouse/icon.svg b/uncompressed/clubhouse/icon.svg new file mode 100644 index 0000000..eaf00fc --- /dev/null +++ b/uncompressed/clubhouse/icon.svg | |||
@@ -0,0 +1,20 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> | ||
3 | <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" | ||
4 | viewBox="0 0 1000 1000" style="enable-background:new 0 0 1000 1000;" xml:space="preserve"> | ||
5 | <style type="text/css"> | ||
6 | .st0{fill:#6515DD;} | ||
7 | .st1{fill:#FFFFFF;} | ||
8 | </style> | ||
9 | <rect x="-0.1" class="st0" width="1000.1" height="1000.1"/> | ||
10 | <g> | ||
11 | <g> | ||
12 | <g> | ||
13 | <path class="st1" d="M235.9,651c-24.7,0-44.9,20.1-44.9,44.9c0,24.7,20.1,44.9,44.9,44.9s44.9-20.1,44.9-44.9 | ||
14 | C280.8,671.1,260.7,651,235.9,651z"/> | ||
15 | </g> | ||
16 | <path class="st1" d="M788,259.4l-282.4,90v-89.1l-304.5,97.2v258.2l262.5-83.8v88.7l345.3-110.3l-93.5-91.4L788,259.4z | ||
17 | M463.6,487.7L243,558.1V388.3L463.6,318V487.7z M730.7,491.2L505.5,563V393.5L713,327.1l-47.5,100.3L730.7,491.2z"/> | ||
18 | </g> | ||
19 | </g> | ||
20 | </svg> | ||
diff --git a/uncompressed/clubhouse/index.js b/uncompressed/clubhouse/index.js new file mode 100644 index 0000000..23607bd --- /dev/null +++ b/uncompressed/clubhouse/index.js | |||
@@ -0,0 +1 @@ | |||
module.exports = Ferdi => Ferdi; | |||
diff --git a/uncompressed/clubhouse/package.json b/uncompressed/clubhouse/package.json new file mode 100644 index 0000000..ce49f10 --- /dev/null +++ b/uncompressed/clubhouse/package.json | |||
@@ -0,0 +1,14 @@ | |||
1 | { | ||
2 | "id": "clubhouse", | ||
3 | "name": "Clubhouse", | ||
4 | "version": "1.0.1", | ||
5 | "description": "Project Management for Software Teams", | ||
6 | "main": "index.js", | ||
7 | "author": "Daniele Lenares <daniele.lenares@gmail.com>", | ||
8 | "license": "MIT", | ||
9 | "repository": "https://github.com/dnlnrs/ferdi-recipe-clubhouse", | ||
10 | "config": { | ||
11 | "serviceURL": "https://app.clubhouse.io/{teamId}/dashboard", | ||
12 | "hasTeamId": true | ||
13 | } | ||
14 | } | ||
diff --git a/uncompressed/clubhouse/webview.js b/uncompressed/clubhouse/webview.js new file mode 100644 index 0000000..51cd09d --- /dev/null +++ b/uncompressed/clubhouse/webview.js | |||
@@ -0,0 +1,10 @@ | |||
1 | module.exports = (Ferdi) => { | ||
2 | function getMessages() { | ||
3 | const hasNotifications = document.querySelector('#notifications-link .badge').classList.contains('visible'); | ||
4 | if (hasNotifications) { | ||
5 | Ferdi.setBadge(0, 1); | ||
6 | } | ||
7 | } | ||
8 | |||
9 | Ferdi.loop(getMessages); | ||
10 | } | ||
diff --git a/uncompressed/guilded/README.md b/uncompressed/guilded/README.md new file mode 100644 index 0000000..caba8cf --- /dev/null +++ b/uncompressed/guilded/README.md | |||
@@ -0,0 +1,8 @@ | |||
1 | # Guilded for Ferdi | ||
2 | This is the unofficial Ferdi recipe for Guilded, it only supports the current server. | ||
3 | |||
4 | ### Release notes | ||
5 | 1.0.0: First version | ||
6 | |||
7 | ### How to create your own Ferdi recipes: | ||
8 | * [Read the documentation](https://github.com/getferdi/recipes/blob/master/docs/integration.md) \ No newline at end of file | ||
diff --git a/uncompressed/guilded/icon.png b/uncompressed/guilded/icon.png new file mode 100644 index 0000000..e2cd5ae --- /dev/null +++ b/uncompressed/guilded/icon.png | |||
Binary files differ | |||
diff --git a/uncompressed/guilded/icon.svg b/uncompressed/guilded/icon.svg new file mode 100644 index 0000000..199d4a5 --- /dev/null +++ b/uncompressed/guilded/icon.svg | |||
@@ -0,0 +1,9 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <svg width="1024px" height="1024px" viewBox="0 0 136 129" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
3 | <!-- Generator: Sketch 56.2 (81672) - https://sketch.com --> | ||
4 | <title>Logomark / Guilded-Wordmark-Black</title> | ||
5 | <desc>Created with Sketch.</desc> | ||
6 | <g id="Logomark-/-Guilded-Wordmark-Black" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> | ||
7 | <path d="M47.8903288,48.2641509 C47.8903288,48.2641509 47.9503286,56.8036226 52.3351089,65.6355094 C56.8398888,74.1369434 63.0510609,79.5977358 68.175038,81.7730189 C73.4694143,79.2981887 78.5837914,75.0023019 81.3749789,70.3735849 L66.840644,70.3735849 C63.0798608,67.2568679 60.1206741,62.0861132 59.4414771,56.109434 L102.079686,56.109434 C99.9772956,65.718717 95.5157156,74.4578868 91.2653346,80.023283 C85.3658754,87.739919 77.3664831,93.6292832 68.2062379,97 L68.0718385,97 C52.7791069,90.9068302 44.5519438,81.309434 39.1231681,70.480566 C35.6407837,63.5410566 32,50.9410566 32,34 L104,34 C104.011637,38.7709414 103.690875,43.5370029 103.039682,48.2641509 L47.8903288,48.2641509 Z" id="Path" fill="#111820" fill-rule="nonzero"></path> | ||
8 | </g> | ||
9 | </svg> \ No newline at end of file | ||
diff --git a/uncompressed/guilded/index.js b/uncompressed/guilded/index.js new file mode 100644 index 0000000..e8243fb --- /dev/null +++ b/uncompressed/guilded/index.js | |||
@@ -0,0 +1,3 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Franz => Franz; \ No newline at end of file | ||
diff --git a/uncompressed/guilded/package.json b/uncompressed/guilded/package.json new file mode 100644 index 0000000..fbb7eda --- /dev/null +++ b/uncompressed/guilded/package.json | |||
@@ -0,0 +1,14 @@ | |||
1 | { | ||
2 | "id": "guilded", | ||
3 | "name": "Guilded", | ||
4 | "version": "1.0.0", | ||
5 | "description": "Guilded", | ||
6 | "main": "index.js", | ||
7 | "author": "Jake Lee <ferdi@jakelee.co.uk>", | ||
8 | "license": "MIT", | ||
9 | "config": { | ||
10 | "serviceURL": "https://www.guilded.gg/", | ||
11 | "hasTeamId": false, | ||
12 | "hasNotificationSound": true | ||
13 | } | ||
14 | } | ||
diff --git a/uncompressed/guilded/webview.js b/uncompressed/guilded/webview.js new file mode 100644 index 0000000..371fac8 --- /dev/null +++ b/uncompressed/guilded/webview.js | |||
@@ -0,0 +1,15 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Franz => { | ||
4 | const getMessages = function getMessages() { | ||
5 | var unread = 0 | ||
6 | const notificationBadge = document.getElementsByClassName('NavSelectorItem-unread-badge')[0] | ||
7 | if (notificationBadge != undefined) { | ||
8 | const innerBadge = notificationBadge.getElementsByClassName('BadgeV2-count')[0] | ||
9 | unread = innerBadge.innerText; | ||
10 | } | ||
11 | Franz.setBadge(parseInt(unread, 10)); | ||
12 | }; | ||
13 | |||
14 | Franz.loop(getMessages); | ||
15 | }; \ No newline at end of file | ||
diff --git a/uncompressed/hangouts/index.js b/uncompressed/hangouts/index.js index a671025..8be0a8e 100644 --- a/uncompressed/hangouts/index.js +++ b/uncompressed/hangouts/index.js | |||
@@ -1,11 +1,15 @@ | |||
1 | var os = require('os') | 1 | module.exports = (Franz) => |
2 | |||
3 | module.exports = Franz => | ||
4 | class hangouts extends Franz { | 2 | class hangouts extends Franz { |
5 | overrideUserAgent() { | 3 | modifyRequestHeaders() { |
6 | if (os.platform() == 'linux') | 4 | return [ |
7 | return "Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0" | 5 | { |
8 | else | 6 | headers: { |
9 | return "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:72.0) Gecko/20100101 Firefox/72.0"; | 7 | 'user-agent': window.navigator.userAgent.replace(/(Ferdi|Electron)\/\S+ \([^)]+\)/g, '').trim(), |
8 | }, | ||
9 | requestFilters: { | ||
10 | urls: ['*://*/*'], | ||
11 | }, | ||
12 | }, | ||
13 | ]; | ||
10 | } | 14 | } |
11 | }; | 15 | }; |
diff --git a/uncompressed/hangouts/package.json b/uncompressed/hangouts/package.json index f0e0184..c6edbbd 100644 --- a/uncompressed/hangouts/package.json +++ b/uncompressed/hangouts/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "hangouts", | 2 | "id": "hangouts", |
3 | "name": "Hangouts", | 3 | "name": "Hangouts", |
4 | "version": "1.0.2", | 4 | "version": "1.0.4", |
5 | "description": "Hangouts", | 5 | "description": "Hangouts", |
6 | "main": "index.js", | 6 | "main": "index.js", |
7 | "author": "Stefan Malzner <stefan@adlk.io>", | 7 | "author": "Stefan Malzner <stefan@adlk.io>", |
diff --git a/uncompressed/hangoutschat/index.js b/uncompressed/hangoutschat/index.js index 95e7fa5..819e06b 100644 --- a/uncompressed/hangoutschat/index.js +++ b/uncompressed/hangoutschat/index.js | |||
@@ -3,6 +3,16 @@ var os = require('os') | |||
3 | // just pass through Franz | 3 | // just pass through Franz |
4 | module.exports = Franz => | 4 | module.exports = Franz => |
5 | class HangoutsChat extends Franz { | 5 | class HangoutsChat extends Franz { |
6 | // Method to add headers to requests from Hangouts Chat's webview | ||
7 | modifyRequestHeaders() { | ||
8 | return [{ | ||
9 | headers: { 'origin': 'https://chat.google.com' }, | ||
10 | requestFilters: { | ||
11 | urls: ['*://*/*'] | ||
12 | } | ||
13 | }] | ||
14 | } | ||
15 | |||
6 | overrideUserAgent() { | 16 | overrideUserAgent() { |
7 | if (os.platform() == 'linux') | 17 | if (os.platform() == 'linux') |
8 | return "Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0" | 18 | return "Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0" |
diff --git a/uncompressed/hangoutschat/package.json b/uncompressed/hangoutschat/package.json index 40b0357..bcc58f9 100644 --- a/uncompressed/hangoutschat/package.json +++ b/uncompressed/hangoutschat/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "hangoutschat", | 2 | "id": "hangoutschat", |
3 | "name": "Hangouts Chat", | 3 | "name": "Hangouts Chat", |
4 | "version": "1.2.3", | 4 | "version": "1.3.0", |
5 | "description": "Hangouts Chat", | 5 | "description": "Hangouts Chat", |
6 | "main": "index.js", | 6 | "main": "index.js", |
7 | "author": "Stefan Malzner <stefan@adlk.io> and Iván López (ilopmar)", | 7 | "author": "Stefan Malzner <stefan@adlk.io> and Iván López (ilopmar)", |
diff --git a/uncompressed/whatsapp/index.js b/uncompressed/whatsapp/index.js index f9b8099..504a70e 100644 --- a/uncompressed/whatsapp/index.js +++ b/uncompressed/whatsapp/index.js | |||
@@ -2,10 +2,16 @@ | |||
2 | 2 | ||
3 | module.exports = (Franz) => | 3 | module.exports = (Franz) => |
4 | class Messenger extends Franz { | 4 | class Messenger extends Franz { |
5 | overrideUserAgent() { | 5 | modifyRequestHeaders() { |
6 | return window.navigator.userAgent.replace( | 6 | return [ |
7 | /(Ferdi|Electron)\/\S+ \([^)]+\)/g, | 7 | { |
8 | "" | 8 | headers: { |
9 | ); | 9 | 'user-agent': window.navigator.userAgent.replace(/(Ferdi|Electron)\/\S+ \([^)]+\)/g,"").trim(), |
10 | }, | ||
11 | requestFilters: { | ||
12 | urls: ['*://*/*'], | ||
13 | } | ||
14 | } | ||
15 | ] | ||
10 | } | 16 | } |
11 | }; | 17 | }; |
diff --git a/uncompressed/whatsapp/package.json b/uncompressed/whatsapp/package.json index 5331ac9..19daf29 100644 --- a/uncompressed/whatsapp/package.json +++ b/uncompressed/whatsapp/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "whatsapp", | 2 | "id": "whatsapp", |
3 | "name": "WhatsApp", | 3 | "name": "WhatsApp", |
4 | "version": "2.0.2", | 4 | "version": "2.0.3", |
5 | "description": "WhatsApp", | 5 | "description": "WhatsApp", |
6 | "main": "index.js", | 6 | "main": "index.js", |
7 | "author": "Stefan Malzner <stefan@adlk.io>", | 7 | "author": "Stefan Malzner <stefan@adlk.io>", |
diff --git a/uncompressed/zalo/package.json b/uncompressed/zalo/package.json index 8e2417c..183fc20 100644 --- a/uncompressed/zalo/package.json +++ b/uncompressed/zalo/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "zalo", | 2 | "id": "zalo", |
3 | "name": "Zalo", | 3 | "name": "Zalo", |
4 | "version": "1.0.0", | 4 | "version": "1.1.1", |
5 | "description": "Zalo", | 5 | "description": "Zalo", |
6 | "main": "index.js", | 6 | "main": "index.js", |
7 | "author": "RoiArthurB <arthurbrugiere01@gmail.com>", | 7 | "author": "RoiArthurB <arthurbrugiere01@gmail.com>", |
diff --git a/uncompressed/zalo/webview.js b/uncompressed/zalo/webview.js index e20c6b5..0f360c3 100644 --- a/uncompressed/zalo/webview.js +++ b/uncompressed/zalo/webview.js | |||
@@ -3,12 +3,9 @@ | |||
3 | module.exports = Franz => { | 3 | module.exports = Franz => { |
4 | const getMessages = function getMessages() { | 4 | const getMessages = function getMessages() { |
5 | var unread = 0 | 5 | var unread = 0 |
6 | const notificationBadge = document.getElementsByClassName('notification-badge')[0] | 6 | const notificationBadge = document.getElementsByClassName('tab-red-dot').length; |
7 | if (notificationBadge != undefined) { | 7 | Franz.setBadge(notificationBadge); |
8 | unread = notificationBadge.innerText; | ||
9 | } | ||
10 | Franz.setBadge(parseInt(unread, 10)); | ||
11 | }; | 8 | }; |
12 | 9 | ||
13 | Franz.loop(getMessages); | 10 | Franz.loop(getMessages); |
14 | }; \ No newline at end of file | 11 | }; |