aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/telegram
diff options
context:
space:
mode:
authorLibravatar Bennett <hello@vantezzen.io>2020-09-22 20:56:48 +0200
committerLibravatar GitHub <noreply@github.com>2020-09-22 19:56:48 +0100
commit6f5e4a00588aefdda7a5a1cfe70935870e7e234a (patch)
tree9e29aa7aa0620a1a4a968ff8739b4b8ba96791a9 /recipes/telegram
parentUpdated logos for Outlook/OWA (diff)
downloadferdium-recipes-6f5e4a00588aefdda7a5a1cfe70935870e7e234a.tar.gz
ferdium-recipes-6f5e4a00588aefdda7a5a1cfe70935870e7e234a.tar.zst
ferdium-recipes-6f5e4a00588aefdda7a5a1cfe70935870e7e234a.zip
Unpack recipes and update recipes icons (#292)
Co-authored-by: Amine Mouafik <amine@mouafik.fr>
Diffstat (limited to 'recipes/telegram')
-rw-r--r--recipes/telegram/README.md5
-rw-r--r--recipes/telegram/icon.pngbin0 -> 15968 bytes
-rw-r--r--recipes/telegram/icon.svg27
-rw-r--r--recipes/telegram/index.js4
-rw-r--r--recipes/telegram/package.json14
-rw-r--r--recipes/telegram/service.css151
-rw-r--r--recipes/telegram/webview.js26
7 files changed, 227 insertions, 0 deletions
diff --git a/recipes/telegram/README.md b/recipes/telegram/README.md
new file mode 100644
index 0000000..7a192ab
--- /dev/null
+++ b/recipes/telegram/README.md
@@ -0,0 +1,5 @@
1# Telegram for Franz
2This is the official Franz recipe for Telegram
3
4### How to create your own Franz recipes:
5* [Read the documentation](https://github.com/meetfranz/plugins)
diff --git a/recipes/telegram/icon.png b/recipes/telegram/icon.png
new file mode 100644
index 0000000..3a3135e
--- /dev/null
+++ b/recipes/telegram/icon.png
Binary files differ
diff --git a/recipes/telegram/icon.svg b/recipes/telegram/icon.svg
new file mode 100644
index 0000000..5cfd9c5
--- /dev/null
+++ b/recipes/telegram/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/recipes/telegram/index.js b/recipes/telegram/index.js
new file mode 100644
index 0000000..6343150
--- /dev/null
+++ b/recipes/telegram/index.js
@@ -0,0 +1,4 @@
1"use strict";
2
3module.exports = Franz => Franz;
4//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlbGVncmFtL2luZGV4LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJGcmFueiJdLCJtYXBwaW5ncyI6Ijs7QUFBQUEsT0FBT0MsT0FBUCxHQUFpQkMsU0FBU0EsS0FBMUIiLCJmaWxlIjoidGVsZWdyYW0vaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IEZyYW56ID0+IEZyYW56O1xuIl19 \ No newline at end of file
diff --git a/recipes/telegram/package.json b/recipes/telegram/package.json
new file mode 100644
index 0000000..a169b8d
--- /dev/null
+++ b/recipes/telegram/package.json
@@ -0,0 +1,14 @@
1{
2 "id": "telegram",
3 "name": "Telegram",
4 "version": "3.0.0",
5 "description": "Telegram",
6 "main": "index.js",
7 "author": "Stefan Malzner <stefan@adlk.io>",
8 "license": "MIT",
9 "config": {
10 "serviceURL": "https://web.telegram.org",
11 "hasDirectMessages": true,
12 "hasNotificationSound": true
13 }
14}
diff --git a/recipes/telegram/service.css b/recipes/telegram/service.css
new file mode 100644
index 0000000..69291a1
--- /dev/null
+++ b/recipes/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
25body.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/recipes/telegram/webview.js b/recipes/telegram/webview.js
new file mode 100644
index 0000000..6610c7c
--- /dev/null
+++ b/recipes/telegram/webview.js
@@ -0,0 +1,26 @@
1'use strict';
2
3const path = require('path');
4
5module.exports = Franz => {
6 const getMessages = function getMessages() {
7 let count = 0;
8 const searchElement = document.querySelector('.im_dialogs_search_field');
9 if (searchElement && searchElement.value === '') {
10 const elements = document.querySelectorAll('.im_dialog_badge:not(.ng-hide):not(.im_dialog_badge_muted)');
11 if (elements) {
12 for (let i = 0; i < elements.length; i += 1) {
13 if (elements[i].innerHTML !== 0) {
14 count += 1;
15 }
16 }
17 }
18 }
19
20 Franz.setBadge(count);
21 };
22
23 Franz.injectCSS(path.join(__dirname, 'service.css'));
24 Franz.loop(getMessages);
25};
26//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlbGVncmFtL3dlYnZpZXcuanMiXSwibmFtZXMiOlsicGF0aCIsInJlcXVpcmUiLCJtb2R1bGUiLCJleHBvcnRzIiwiRnJhbnoiLCJnZXRNZXNzYWdlcyIsImNvdW50Iiwic2VhcmNoRWxlbWVudCIsImRvY3VtZW50IiwicXVlcnlTZWxlY3RvciIsInZhbHVlIiwiZWxlbWVudHMiLCJxdWVyeVNlbGVjdG9yQWxsIiwiaSIsImxlbmd0aCIsImlubmVySFRNTCIsInNldEJhZGdlIiwiaW5qZWN0Q1NTIiwiam9pbiIsIl9fZGlybmFtZSIsImxvb3AiXSwibWFwcGluZ3MiOiI7O0FBQUEsTUFBTUEsT0FBT0MsUUFBUSxNQUFSLENBQWI7O0FBRUFDLE9BQU9DLE9BQVAsR0FBa0JDLEtBQUQsSUFBVztBQUMxQixRQUFNQyxjQUFjLFNBQVNBLFdBQVQsR0FBdUI7QUFDekMsUUFBSUMsUUFBUSxDQUFaO0FBQ0EsVUFBTUMsZ0JBQWdCQyxTQUFTQyxhQUFULENBQXVCLDBCQUF2QixDQUF0QjtBQUNBLFFBQUlGLGlCQUFpQkEsY0FBY0csS0FBZCxLQUF3QixFQUE3QyxFQUFpRDtBQUMvQyxZQUFNQyxXQUFXSCxTQUFTSSxnQkFBVCxDQUEwQiw0REFBMUIsQ0FBakI7QUFDQSxVQUFJRCxRQUFKLEVBQWM7QUFDWixhQUFLLElBQUlFLElBQUksQ0FBYixFQUFnQkEsSUFBSUYsU0FBU0csTUFBN0IsRUFBcUNELEtBQUssQ0FBMUMsRUFBNkM7QUFDM0MsY0FBSUYsU0FBU0UsQ0FBVCxFQUFZRSxTQUFaLEtBQTBCLENBQTlCLEVBQWlDO0FBQy9CVCxxQkFBUyxDQUFUO0FBQ0Q7QUFDRjtBQUNGO0FBQ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