diff options
author | 2020-04-21 20:25:06 +0000 | |
---|---|---|
committer | 2020-04-21 20:25:06 +0000 | |
commit | 9f371fd118e5d74e54985a2fb21a286cc78c4bdb (patch) | |
tree | 5fcee15c31f142263c516d6bb1a1e043939960d8 | |
parent | Repackage archives not passing the checks (#131) (diff) | |
download | ferdium-recipes-9f371fd118e5d74e54985a2fb21a286cc78c4bdb.tar.gz ferdium-recipes-9f371fd118e5d74e54985a2fb21a286cc78c4bdb.tar.zst ferdium-recipes-9f371fd118e5d74e54985a2fb21a286cc78c4bdb.zip |
Switch back to original Telegram, add Telegram React (#132)
-rw-r--r-- | all.json | 15 | ||||
-rw-r--r-- | archives/telegram-react.tar.gz | bin | 0 -> 18152 bytes | |||
-rw-r--r-- | archives/telegram.tar.gz | bin | 18157 -> 20279 bytes | |||
-rw-r--r-- | uncompressed/telegram-react/README.md | 7 | ||||
-rw-r--r-- | uncompressed/telegram-react/icon.png | bin | 0 -> 15968 bytes | |||
-rw-r--r-- | uncompressed/telegram-react/icon.svg | 27 | ||||
-rw-r--r-- | uncompressed/telegram-react/index.js | 4 | ||||
-rw-r--r-- | uncompressed/telegram-react/package.json | 14 | ||||
-rw-r--r-- | uncompressed/telegram-react/webview.js | 19 | ||||
-rw-r--r-- | uncompressed/telegram/README.md | 8 | ||||
-rw-r--r-- | uncompressed/telegram/package.json | 6 | ||||
-rw-r--r-- | uncompressed/telegram/service.css | 151 | ||||
-rw-r--r-- | uncompressed/telegram/webview.js | 21 |
13 files changed, 255 insertions, 17 deletions
@@ -803,17 +803,28 @@ | |||
803 | } | 803 | } |
804 | }, | 804 | }, |
805 | { | 805 | { |
806 | "author": "Amine Mouafik <amine@mouafik.fr>", | 806 | "author": "Stefan Malzner <stefan@adlk.io>", |
807 | "featured": false, | 807 | "featured": false, |
808 | "id": "telegram", | 808 | "id": "telegram", |
809 | "name": "Telegram", | 809 | "name": "Telegram", |
810 | "version": "2.0.0", | 810 | "version": "3.0.0", |
811 | "icons": { | 811 | "icons": { |
812 | "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/telegram/icon.png", | 812 | "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/telegram/icon.png", |
813 | "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/telegram/icon.svg" | 813 | "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/telegram/icon.svg" |
814 | } | 814 | } |
815 | }, | 815 | }, |
816 | { | 816 | { |
817 | "author": "Amine Mouafik <amine@mouafik.fr>", | ||
818 | "featured": false, | ||
819 | "id": "telegram-react", | ||
820 | "name": "Telegram React", | ||
821 | "version": "1.0.0", | ||
822 | "icons": { | ||
823 | "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/telegram-react/icon.png", | ||
824 | "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/telegram-react/icon.svg" | ||
825 | } | ||
826 | }, | ||
827 | { | ||
817 | "author": "Jonathan Juursema <dev@jonathanj.nl>", | 828 | "author": "Jonathan Juursema <dev@jonathanj.nl>", |
818 | "featured": false, | 829 | "featured": false, |
819 | "id": "thelounge", | 830 | "id": "thelounge", |
diff --git a/archives/telegram-react.tar.gz b/archives/telegram-react.tar.gz new file mode 100644 index 0000000..4316028 --- /dev/null +++ b/archives/telegram-react.tar.gz | |||
Binary files differ | |||
diff --git a/archives/telegram.tar.gz b/archives/telegram.tar.gz index 1e0e715..b7ed406 100644 --- a/archives/telegram.tar.gz +++ b/archives/telegram.tar.gz | |||
Binary files differ | |||
diff --git a/uncompressed/telegram-react/README.md b/uncompressed/telegram-react/README.md new file mode 100644 index 0000000..fbd7ca6 --- /dev/null +++ b/uncompressed/telegram-react/README.md | |||
@@ -0,0 +1,7 @@ | |||
1 | # Telegram for Ferdi | ||
2 | |||
3 | This is the official Ferdi recipe for Telegram | ||
4 | |||
5 | ### How to create your own Franz recipes: | ||
6 | |||
7 | - [Read the documentation](https://github.com/getferdi/recipes/tree/master/docs) | ||
diff --git a/uncompressed/telegram-react/icon.png b/uncompressed/telegram-react/icon.png new file mode 100644 index 0000000..3a3135e --- /dev/null +++ b/uncompressed/telegram-react/icon.png | |||
Binary files differ | |||
diff --git a/uncompressed/telegram-react/icon.svg b/uncompressed/telegram-react/icon.svg new file mode 100644 index 0000000..5cfd9c5 --- /dev/null +++ b/uncompressed/telegram-react/icon.svg | |||
@@ -0,0 +1,27 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
2 | <svg width="80px" height="80px" viewBox="0 0 80 80" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
3 | <!-- Generator: Sketch 3.7.2 (28276) - http://www.bohemiancoding.com/sketch --> | ||
4 | <title>telegram</title> | ||
5 | <desc>Created with Sketch.</desc> | ||
6 | <defs> | ||
7 | <path d="M39.9821723,0.035505618 C17.9006742,0.035505618 0,17.93603 0,40.0176779 L0,40.0176779 C0,62.0993258 17.9006742,80 39.9821723,80 L39.9821723,80 C62.0638202,80 79.9644944,62.0993258 79.9644944,40.0176779 L79.9644944,40.0176779 C79.9644944,17.93603 62.0638202,0.035505618 39.9821723,0.035505618 L39.9821723,0.035505618 Z" id="path-1"></path> | ||
8 | </defs> | ||
9 | <g id="icons" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> | ||
10 | <g id="telegram"> | ||
11 | <g id="Page-1"> | ||
12 | <g id="Group-3"></g> | ||
13 | <mask id="mask-2" fill="white"> | ||
14 | <use xlink:href="#path-1"></use> | ||
15 | </mask> | ||
16 | <use id="Clip-2" fill="#0088CC" xlink:href="#path-1"></use> | ||
17 | <g id="Group-10" mask="url(#mask-2)"> | ||
18 | <g transform="translate(14.232210, 21.573034)"> | ||
19 | <path d="M45.2046742,1.4619176 L38.0635506,37.4668614 C38.0635506,37.4668614 37.0647491,39.9637903 34.3182322,38.7651386 L17.8388315,26.1308315 L11.8463221,23.2346517 L1.75898127,19.8386966 C1.75898127,19.8386966 0.210966292,19.289633 0.0611535581,18.0911311 C-0.088659176,16.8926292 1.80886891,16.2433408 1.80886891,16.2433408 L41.908794,0.513003745 C41.908794,0.513003745 45.2046742,-0.935086142 45.2046742,1.4619176" id="Fill-4" fill="#FEFEFE"></path> | ||
20 | <path d="M16.5721498,37.0625618 C16.5721498,37.0625618 16.0911011,37.0174682 15.4918502,35.1196404 C14.8925993,33.2221124 11.8463071,23.2346966 11.8463071,23.2346966 L36.0660824,7.85387266 C36.0660824,7.85387266 37.4642846,7.00503371 37.414397,7.85387266 C37.414397,7.85387266 37.6641348,8.00368539 36.9150712,8.70286142 C36.1660075,9.40203745 17.8888539,25.8312509 17.8888539,25.8312509" id="Fill-6" fill="#D3E5F1"></path> | ||
21 | <path d="M24.1574532,30.975236 L17.6391011,36.9183071 C17.6391011,36.9183071 17.129588,37.304824 16.5721348,37.0625768 L17.8202247,26.0234757" id="Fill-8" fill="#B6D0E4"></path> | ||
22 | </g> | ||
23 | </g> | ||
24 | </g> | ||
25 | </g> | ||
26 | </g> | ||
27 | </svg> \ No newline at end of file | ||
diff --git a/uncompressed/telegram-react/index.js b/uncompressed/telegram-react/index.js new file mode 100644 index 0000000..6343150 --- /dev/null +++ b/uncompressed/telegram-react/index.js | |||
@@ -0,0 +1,4 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Franz => Franz; | ||
4 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlbGVncmFtL2luZGV4LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJGcmFueiJdLCJtYXBwaW5ncyI6Ijs7QUFBQUEsT0FBT0MsT0FBUCxHQUFpQkMsU0FBU0EsS0FBMUIiLCJmaWxlIjoidGVsZWdyYW0vaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IEZyYW56ID0+IEZyYW56O1xuIl19 \ No newline at end of file | ||
diff --git a/uncompressed/telegram-react/package.json b/uncompressed/telegram-react/package.json new file mode 100644 index 0000000..8a00a5b --- /dev/null +++ b/uncompressed/telegram-react/package.json | |||
@@ -0,0 +1,14 @@ | |||
1 | { | ||
2 | "id": "telegram-react", | ||
3 | "name": "Telegram React", | ||
4 | "version": "1.0.0", | ||
5 | "description": "Telegram React", | ||
6 | "main": "index.js", | ||
7 | "author": "Amine Mouafik <amine@mouafik.fr>", | ||
8 | "license": "MIT", | ||
9 | "config": { | ||
10 | "serviceURL": "https://evgeny-nadymov.github.io/telegram-react/", | ||
11 | "hasDirectMessages": true, | ||
12 | "hasNotificationSound": true | ||
13 | } | ||
14 | } | ||
diff --git a/uncompressed/telegram-react/webview.js b/uncompressed/telegram-react/webview.js new file mode 100644 index 0000000..1727953 --- /dev/null +++ b/uncompressed/telegram-react/webview.js | |||
@@ -0,0 +1,19 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | const path = require("path"); | ||
4 | |||
5 | module.exports = Franz => { | ||
6 | const getMessages = function getMessages() { | ||
7 | let count = 0; | ||
8 | const elements = document.querySelectorAll(".dialog-badge-text"); | ||
9 | if (elements) { | ||
10 | for (let i = 0; i < elements.length; i += 1) { | ||
11 | if (elements[i].innerHTML !== 0) { | ||
12 | count += parseInt(elements[i].innerHTML); | ||
13 | } | ||
14 | } | ||
15 | } | ||
16 | Franz.setBadge(count); | ||
17 | }; | ||
18 | Franz.loop(getMessages); | ||
19 | }; | ||
diff --git a/uncompressed/telegram/README.md b/uncompressed/telegram/README.md index fbd7ca6..7a192ab 100644 --- a/uncompressed/telegram/README.md +++ b/uncompressed/telegram/README.md | |||
@@ -1,7 +1,5 @@ | |||
1 | # Telegram for Ferdi | 1 | # Telegram for Franz |
2 | 2 | This is the official Franz recipe for Telegram | |
3 | This is the official Ferdi recipe for Telegram | ||
4 | 3 | ||
5 | ### How to create your own Franz recipes: | 4 | ### How to create your own Franz recipes: |
6 | 5 | * [Read the documentation](https://github.com/meetfranz/plugins) | |
7 | - [Read the documentation](https://github.com/getferdi/recipes/tree/master/docs) | ||
diff --git a/uncompressed/telegram/package.json b/uncompressed/telegram/package.json index ce21700..a169b8d 100644 --- a/uncompressed/telegram/package.json +++ b/uncompressed/telegram/package.json | |||
@@ -1,13 +1,13 @@ | |||
1 | { | 1 | { |
2 | "id": "telegram", | 2 | "id": "telegram", |
3 | "name": "Telegram", | 3 | "name": "Telegram", |
4 | "version": "2.0.0", | 4 | "version": "3.0.0", |
5 | "description": "Telegram", | 5 | "description": "Telegram", |
6 | "main": "index.js", | 6 | "main": "index.js", |
7 | "author": "Amine Mouafik <amine@mouafik.fr>", | 7 | "author": "Stefan Malzner <stefan@adlk.io>", |
8 | "license": "MIT", | 8 | "license": "MIT", |
9 | "config": { | 9 | "config": { |
10 | "serviceURL": "https://evgeny-nadymov.github.io/telegram-react/", | 10 | "serviceURL": "https://web.telegram.org", |
11 | "hasDirectMessages": true, | 11 | "hasDirectMessages": true, |
12 | "hasNotificationSound": true | 12 | "hasNotificationSound": true |
13 | } | 13 | } |
diff --git a/uncompressed/telegram/service.css b/uncompressed/telegram/service.css new file mode 100644 index 0000000..69291a1 --- /dev/null +++ b/uncompressed/telegram/service.css | |||
@@ -0,0 +1,151 @@ | |||
1 | .tg_head_split { | ||
2 | max-width: 100% !important; | ||
3 | } | ||
4 | |||
5 | .im_page_wrap { | ||
6 | max-width: 100% !important; | ||
7 | } | ||
8 | |||
9 | .im_dialogs_col_wrap { | ||
10 | width: 320px !important; | ||
11 | } | ||
12 | |||
13 | .im_history_col_wrap { | ||
14 | width: calc(100% - 320px) !important; | ||
15 | } | ||
16 | |||
17 | .im_message_wrap { | ||
18 | max-width: inherit !important; | ||
19 | } | ||
20 | |||
21 | .im_message_body { | ||
22 | max-width: 580px !important; | ||
23 | } | ||
24 | |||
25 | body.darkTheme, | ||
26 | .darkTheme .modal-content { | ||
27 | color: #bbb !important; | ||
28 | background: #252525 !important; | ||
29 | } | ||
30 | .darkTheme a.tg_checkbox { | ||
31 | color: #bbb !important; | ||
32 | } | ||
33 | .darkTheme .im_page_wrap { | ||
34 | /*background color of contentwrapper under header*/ | ||
35 | |||
36 | background-color: #303030 !important; | ||
37 | border-left: 1px solid #4d4d4d !important; | ||
38 | border-right: 1px solid #4d4d4d !important; | ||
39 | border-bottom: 1px solid #4d4d4d !important; | ||
40 | box-shadow: none; | ||
41 | } | ||
42 | .darkTheme .im_message_body, | ||
43 | .darkTheme .im_attach, | ||
44 | .darkTheme .im_media_attach, | ||
45 | .darkTheme .im_record, | ||
46 | .darkTheme .im_message_document_thumbed { | ||
47 | background: inherit !important; | ||
48 | } | ||
49 | .darkTheme .im_dialog_peer { | ||
50 | /*peer nickname unselected*/ | ||
51 | |||
52 | color: #bbb !important; | ||
53 | } | ||
54 | .darkTheme .contacts_modal_members_list a.contacts_modal_contact { | ||
55 | /*nicknames in contactlist via hamburger menu*/ | ||
56 | |||
57 | color: #bbb; | ||
58 | } | ||
59 | .darkTheme .active a.im_dialog { | ||
60 | /*selected peer */ | ||
61 | |||
62 | background-color: #4d4d4d !important; | ||
63 | } | ||
64 | .darkTheme .tg_head_split, | ||
65 | .darkTheme .md_modal_head { | ||
66 | /*page header block*/ | ||
67 | |||
68 | background-color: #4d4d4d !important; | ||
69 | } | ||
70 | .darkTheme .dropdown.open .tg_head_btn, | ||
71 | .darkTheme .tg_head_btn:hover { | ||
72 | background: #4d4d4d !important; | ||
73 | } | ||
74 | .darkTheme .form-control { | ||
75 | /*input field*/ | ||
76 | |||
77 | background-color: #0e0e0e !important; | ||
78 | color: #bbb !important; | ||
79 | } | ||
80 | .darkTheme .composer_rich_textarea { | ||
81 | background: #303030 !important; | ||
82 | border-color: #bbb !important; | ||
83 | } | ||
84 | .darkTheme .im_dialogs_col_wrap { | ||
85 | /*contactlist right border*/ | ||
86 | |||
87 | border-right: 2px solid #4d4d4d; | ||
88 | } | ||
89 | .darkTheme .im_dialogs_col .nano > .nano-pane > .nano-slider { | ||
90 | /*scrollbarbutton when hover*/ | ||
91 | |||
92 | background-color: #4d4d4d !important; | ||
93 | } | ||
94 | .darkTheme .tg_head_split { | ||
95 | background-color: #151515; | ||
96 | } | ||
97 | .darkTheme .im_submit { | ||
98 | color: #4d4d4d; | ||
99 | } | ||
100 | .darkTheme .im_message_mymention { | ||
101 | background: #1d1d1d; | ||
102 | } | ||
103 | .darkTheme .im_message_focus .im_message_outer_wrap { | ||
104 | background-color: #4d4d4d; | ||
105 | } | ||
106 | .darkTheme .im_message_selected .im_message_outer_wrap { | ||
107 | background: #4d4d4d; | ||
108 | } | ||
109 | .darkTheme a:hover { | ||
110 | background-color: #282828 !important; | ||
111 | } | ||
112 | .darkTheme .im_message_unread_split { | ||
113 | background: #4d4d4d; | ||
114 | } | ||
115 | @keyframes im_message_focus_fade { | ||
116 | 0% { | ||
117 | background-color: #2d2d2d; | ||
118 | } | ||
119 | } | ||
120 | .darkTheme .btn-primary { | ||
121 | background-color: #4d4d4d; | ||
122 | } | ||
123 | .darkTheme .im_history_select_active .im_message_outer_wrap:hover { | ||
124 | background: #4d4d4d; | ||
125 | } | ||
126 | .darkTheme .im_dialog_chat_from_wrap, | ||
127 | .darkTheme .im_dialog_message_service { | ||
128 | color: #6ac; | ||
129 | } | ||
130 | .darkTheme .composer_rich_textarea, | ||
131 | .darkTheme .composer_textarea { | ||
132 | box-shadow: 0px 3px 1px #ddd; | ||
133 | } | ||
134 | .darkTheme .composer_rich_textarea:focus { | ||
135 | box-shadow: 0px 3px 1px #ddd !important; | ||
136 | } | ||
137 | .darkTheme .tg_head_logo_dropdown .dropdown-menu > li > a { | ||
138 | color: #ddd; | ||
139 | } | ||
140 | .darkTheme .btn-primary.disabled, | ||
141 | .darkTheme .btn-primary[disabled] { | ||
142 | background: #4d4d4d none repeat scroll 0% 0%; | ||
143 | } | ||
144 | /*emoji*/ | ||
145 | |||
146 | .darkTheme .composer_emoji_tooltip, | ||
147 | .darkTheme .icon-tooltip-tail, | ||
148 | .darkTheme .dropdown-menu { | ||
149 | background-color: #4d4d4d !important; | ||
150 | border-color: #5d5d5d; | ||
151 | } | ||
diff --git a/uncompressed/telegram/webview.js b/uncompressed/telegram/webview.js index 1727953..6610c7c 100644 --- a/uncompressed/telegram/webview.js +++ b/uncompressed/telegram/webview.js | |||
@@ -1,19 +1,26 @@ | |||
1 | "use strict"; | 1 | 'use strict'; |
2 | 2 | ||
3 | const path = require("path"); | 3 | const path = require('path'); |
4 | 4 | ||
5 | module.exports = Franz => { | 5 | module.exports = Franz => { |
6 | const getMessages = function getMessages() { | 6 | const getMessages = function getMessages() { |
7 | let count = 0; | 7 | let count = 0; |
8 | const elements = document.querySelectorAll(".dialog-badge-text"); | 8 | const searchElement = document.querySelector('.im_dialogs_search_field'); |
9 | if (elements) { | 9 | if (searchElement && searchElement.value === '') { |
10 | for (let i = 0; i < elements.length; i += 1) { | 10 | const elements = document.querySelectorAll('.im_dialog_badge:not(.ng-hide):not(.im_dialog_badge_muted)'); |
11 | if (elements[i].innerHTML !== 0) { | 11 | if (elements) { |
12 | count += parseInt(elements[i].innerHTML); | 12 | for (let i = 0; i < elements.length; i += 1) { |
13 | if (elements[i].innerHTML !== 0) { | ||
14 | count += 1; | ||
15 | } | ||
13 | } | 16 | } |
14 | } | 17 | } |
15 | } | 18 | } |
19 | |||
16 | Franz.setBadge(count); | 20 | Franz.setBadge(count); |
17 | }; | 21 | }; |
22 | |||
23 | Franz.injectCSS(path.join(__dirname, 'service.css')); | ||
18 | Franz.loop(getMessages); | 24 | Franz.loop(getMessages); |
19 | }; | 25 | }; |
26 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlbGVncmFtL3dlYnZpZXcuanMiXSwibmFtZXMiOlsicGF0aCIsInJlcXVpcmUiLCJtb2R1bGUiLCJleHBvcnRzIiwiRnJhbnoiLCJnZXRNZXNzYWdlcyIsImNvdW50Iiwic2VhcmNoRWxlbWVudCIsImRvY3VtZW50IiwicXVlcnlTZWxl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