diff options
author | 2020-07-15 09:41:56 -0400 | |
---|---|---|
committer | 2020-07-15 09:41:56 -0400 | |
commit | 0957b3a8dbb7ece9b401808dc556520d8e5e7337 (patch) | |
tree | b92fa616fdd3bdde7a0a5b1487e4224581365fa5 /uncompressed/element | |
parent | Update repository (diff) | |
download | ferdium-recipes-0957b3a8dbb7ece9b401808dc556520d8e5e7337.tar.gz ferdium-recipes-0957b3a8dbb7ece9b401808dc556520d8e5e7337.tar.zst ferdium-recipes-0957b3a8dbb7ece9b401808dc556520d8e5e7337.zip |
Update Riot.im to Element.io
Diffstat (limited to 'uncompressed/element')
-rw-r--r-- | uncompressed/element/README.md | 2 | ||||
-rw-r--r-- | uncompressed/element/icon.png | bin | 0 -> 26967 bytes | |||
-rw-r--r-- | uncompressed/element/icon.svg | 6 | ||||
-rw-r--r-- | uncompressed/element/index.js | 3 | ||||
-rw-r--r-- | uncompressed/element/package.json | 18 | ||||
-rw-r--r-- | uncompressed/element/webview.js | 22 |
6 files changed, 51 insertions, 0 deletions
diff --git a/uncompressed/element/README.md b/uncompressed/element/README.md new file mode 100644 index 0000000..affdf4b --- /dev/null +++ b/uncompressed/element/README.md | |||
@@ -0,0 +1,2 @@ | |||
1 | # Element for Franz | ||
2 | This is a Franz recipe/plugin for Element | ||
diff --git a/uncompressed/element/icon.png b/uncompressed/element/icon.png new file mode 100644 index 0000000..58d2a9f --- /dev/null +++ b/uncompressed/element/icon.png | |||
Binary files differ | |||
diff --git a/uncompressed/element/icon.svg b/uncompressed/element/icon.svg new file mode 100644 index 0000000..b30aafe --- /dev/null +++ b/uncompressed/element/icon.svg | |||
@@ -0,0 +1,6 @@ | |||
1 | <svg width="1024" height="1024" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
2 | <path fill-rule="evenodd" clip-rule="evenodd" d="M414 204C414 180.804 432.804 162 456 162C610.64 162 736 287.36 736 442C736 465.196 717.196 484 694 484C670.804 484 652 465.196 652 442C652 333.752 564.248 246 456 246C432.804 246 414 227.196 414 204Z" fill="#0DBD8B"/> | ||
3 | <path fill-rule="evenodd" clip-rule="evenodd" d="M610 820C610 843.196 591.196 862 568 862C413.36 862 288 736.64 288 582C288 558.804 306.804 540 330 540C353.196 540 372 558.804 372 582C372 690.248 459.752 778 568 778C591.196 778 610 796.804 610 820Z" fill="#0DBD8B"/> | ||
4 | <path fill-rule="evenodd" clip-rule="evenodd" d="M204 610C180.804 610 162 591.196 162 568C162 413.36 287.36 288 442 288C465.196 288 484 306.804 484 330C484 353.196 465.196 372 442 372C333.752 372 246 459.752 246 568C246 591.196 227.196 610 204 610Z" fill="#0DBD8B"/> | ||
5 | <path fill-rule="evenodd" clip-rule="evenodd" d="M820 414C843.196 414 862 432.804 862 456C862 610.64 736.64 736 582 736C558.804 736 540 717.196 540 694C540 670.804 558.804 652 582 652C690.248 652 778 564.248 778 456C778 432.804 796.804 414 820 414Z" fill="#0DBD8B"/> | ||
6 | </svg> | ||
diff --git a/uncompressed/element/index.js b/uncompressed/element/index.js new file mode 100644 index 0000000..17daa35 --- /dev/null +++ b/uncompressed/element/index.js | |||
@@ -0,0 +1,3 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Franz => Franz; | ||
diff --git a/uncompressed/element/package.json b/uncompressed/element/package.json new file mode 100644 index 0000000..6774ce3 --- /dev/null +++ b/uncompressed/element/package.json | |||
@@ -0,0 +1,18 @@ | |||
1 | { | ||
2 | "id": "element", | ||
3 | "name": "Element", | ||
4 | "version": "1.0.0", | ||
5 | "description": "Decentralized, encrypted chat & collaboration powered by [matrix]", | ||
6 | "main": "index.js", | ||
7 | "author": "Omove <61330514+omove@users.noreply.github.com>", | ||
8 | "license": "MIT", | ||
9 | "config": { | ||
10 | "serviceURL": "https://app.element.io", | ||
11 | "hasTeamID": false, | ||
12 | "hasCustomUrl": true, | ||
13 | "message": "Element's default URL is https://app.element.io/", | ||
14 | "urlInputSuffix": false, | ||
15 | "hasNotificationSound": true, | ||
16 | "hasIndirectMessages": true | ||
17 | } | ||
18 | } | ||
diff --git a/uncompressed/element/webview.js b/uncompressed/element/webview.js new file mode 100644 index 0000000..6201f27 --- /dev/null +++ b/uncompressed/element/webview.js | |||
@@ -0,0 +1,22 @@ | |||
1 | 'use strict'; | ||
2 | |||
3 | module.exports = Franz => { | ||
4 | function getMessages() { | ||
5 | const indirect_badge = document.getElementsByClassName('mx_RoomSubList_badge'); | ||
6 | let indirect_count = 0; | ||
7 | if (indirect_badge.length !== 0) { | ||
8 | indirect_count = indirect_badge.length; | ||
9 | } | ||
10 | |||
11 | const direct_badge = document.getElementsByClassName('mx_RoomSubList_badgeHighlight'); | ||
12 | let direct_count = 0; | ||
13 | if (direct_badge.length !== 0) { | ||
14 | direct_count = direct_badge.length; | ||
15 | } | ||
16 | // set Franz badge | ||
17 | Franz.setBadge(direct_count, indirect_count); | ||
18 | } | ||
19 | |||
20 | // check for new messages every second and update Franz badge | ||
21 | Franz.loop(getMessages); | ||
22 | }; | ||