diff options
author | 2019-09-28 12:10:25 +0200 | |
---|---|---|
committer | 2019-09-28 12:10:25 +0200 | |
commit | 728d339739b63e9bb59e457e4a84fe9a65b93fc9 (patch) | |
tree | a0fc6180ea26fa9ef397458e8eb6491031d6437d /uncompressed/hangoutschat | |
parent | Add list of recipes (diff) | |
download | ferdium-recipes-728d339739b63e9bb59e457e4a84fe9a65b93fc9.tar.gz ferdium-recipes-728d339739b63e9bb59e457e4a84fe9a65b93fc9.tar.zst ferdium-recipes-728d339739b63e9bb59e457e4a84fe9a65b93fc9.zip |
Add uncompressed recipes
Diffstat (limited to 'uncompressed/hangoutschat')
-rw-r--r-- | uncompressed/hangoutschat/README.md | 5 | ||||
-rw-r--r-- | uncompressed/hangoutschat/icon.svg | 30 | ||||
-rw-r--r-- | uncompressed/hangoutschat/index.js | 5 | ||||
-rw-r--r-- | uncompressed/hangoutschat/package.json | 14 | ||||
-rw-r--r-- | uncompressed/hangoutschat/webview.js | 30 |
5 files changed, 84 insertions, 0 deletions
diff --git a/uncompressed/hangoutschat/README.md b/uncompressed/hangoutschat/README.md new file mode 100644 index 0000000..c899924 --- /dev/null +++ b/uncompressed/hangoutschat/README.md | |||
@@ -0,0 +1,5 @@ | |||
1 | # Hangouts Chat for Franz | ||
2 | This is the official Franz recipe for Hangouts Chat | ||
3 | |||
4 | ### How to create your own Franz recipes: | ||
5 | * [Read the documentation](https://github.com/meetfranz/plugins) | ||
diff --git a/uncompressed/hangoutschat/icon.svg b/uncompressed/hangoutschat/icon.svg new file mode 100644 index 0000000..eae3ddd --- /dev/null +++ b/uncompressed/hangoutschat/icon.svg | |||
@@ -0,0 +1,30 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
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 47.1 (45422) - http://www.bohemiancoding.com/sketch --> | ||
4 | <title>hangoutschat</title> | ||
5 | <desc>Created with Sketch.</desc> | ||
6 | <defs> | ||
7 | <path d="M67.9018789,28.2204882 C66.6910039,21.6010607 63.8001645,15.8184624 59.2336961,10.8844306 C57.3057472,8.80126937 55.146722,6.99067533 52.7626899,5.45395266 C48.3228149,2.59177951 43.4853845,0.838568044 38.2399937,0.216923512 C37.6005233,0.141282848 36.9519487,0.15084661 36.3215827,0 L31.7954334,0 C31.7460099,0.114330428 31.6410934,0.0725976482 31.5582874,0.0799878279 C30.3933676,0.183450345 29.2327832,0.316038864 28.0834707,0.534701241 C19.6784462,2.1318495 12.7760685,6.26948073 7.43356489,12.953681 C3.03921152,18.4511053 0.619195683,24.7571022 0.0963474024,31.7882061 C-0.156839493,35.1955137 0.0889772359,38.5719564 0.833797589,41.9023192 C1.38742715,44.3806377 2.2128858,46.7741865 3.32404678,49.062534 C3.42115956,49.2572869 3.51827234,49.4524746 3.61668574,49.6463582 C5.44145225,53.2497229 7.78906704,56.4601039 10.7306305,59.2331602 C12.2796661,60.6933727 13.9340517,62.0136066 15.7267363,63.1547373 C21.2170768,66.6489882 27.2103228,68.4813181 33.7212145,68.5634795 C34.1205041,68.5686961 34.2293225,68.6678114 34.2271548,69.0768796 C34.2089461,72.5711305 34.2163163,76.0658161 34.2171834,79.5605017 C34.2176169,79.6961332 34.2284554,79.83133 34.2358256,80 C34.3481122,79.9534853 34.4187791,79.9278371 34.4872783,79.8956681 C41.0319861,76.8122242 47.0421401,72.9158606 52.4002512,68.0318212 C53.4663241,67.0597952 54.4864418,66.0416893 55.467541,64.9818506 C55.8876405,64.5284413 56.3038381,64.0667724 56.7252383,63.6142326 C57.3755471,62.9169474 57.9382809,62.1375008 58.5517389,61.4036994 C59.2592749,60.5568718 59.8948434,59.6570087 60.5217411,58.7510596 C61.9081994,56.7487556 63.1455203,54.6599431 64.1860144,52.4533223 C64.712331,51.3374052 65.2139359,50.2132284 65.6570129,49.0629687 C65.6717533,49.0412329 65.6916961,49.0221053 65.7008004,48.9981959 C66.9095077,45.8473711 67.6842423,42.5869976 68.0969716,39.2414198 C68.2409066,38.0768144 68.3341175,36.9039494 68.3926453,35.7323885 C68.5183717,33.2114678 68.3557945,30.7027192 67.9018789,28.2204882" id="path-1"></path> | ||
8 | <path d="M37.8634293,35.3543361 C37.866947,32.1384791 35.8223623,29.9435997 32.8150153,29.9360925 C29.8555628,29.9283073 27.6618825,32.207434 27.6459176,35.3065125 C27.629141,38.5451691 29.7687031,40.9163284 32.7541323,40.8968653 C35.8908218,40.876012 38.0947845,38.3327435 37.8634293,35.3543361 M39.0358996,42.0674306 C35.2327448,46.8508997 29.2280625,45.6694908 26.4177056,43.1125981 C22.5409501,39.5856098 22.0111331,33.1825343 25.3172125,28.9039931 C28.4725728,24.8206388 33.1151005,24.4338796 38.0081955,27.9166589 C38.0412075,27.374473 38.0712431,26.8859497 38.1107494,26.2392193 L42.2775784,26.2392193 C42.2775784,26.830897 42.2775784,27.4097846 42.2773078,27.9883942 C42.276496,31.3699654 42.2575547,34.7515367 42.2808255,38.1328299 C42.2938138,40.060787 43.0587743,41.1782459 44.3881873,41.3525795 C45.8323308,41.5422055 46.7964461,40.7342096 47.3005569,38.9121872 C48.8740429,33.2250751 46.7247395,26.9557388 41.986152,23.4109557 C33.7071534,17.2178034 21.7979075,21.5419439 19.398037,31.6132539 C17.3596759,40.168112 22.7663523,48.3159136 31.2371998,49.6563638 C34.1609343,50.1193071 36.8395134,49.5192881 39.6141523,48.3665176 C40.1152867,49.6541394 40.591256,50.8761429 41.1930501,52.4226236 C39.4991512,52.9066983 37.9565126,53.5639943 36.3592146,53.7669664 C29.14905,54.6831214 22.89813,52.6358834 18.3386737,46.6445911 C9.82561395,35.4586026 16.069228,19.2530856 29.7592324,16.7331727 C38.5537067,15.1146786 46.6773861,19.2322323 50.3501162,27.3216447 C52.284841,31.5832252 52.6376915,36.0060712 51.03877,40.5237303 C49.0761743,46.06904 42.0356701,47.1648114 39.0358996,42.0674306" id="path-3"></path> | ||
9 | <filter x="-23.9%" y="-23.9%" width="147.9%" height="147.9%" filterUnits="objectBoundingBox" id="filter-4"> | ||
10 | <feOffset dx="0" dy="0" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset> | ||
11 | <feGaussianBlur stdDeviation="3" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur> | ||
12 | <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.233723958 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix> | ||
13 | </filter> | ||
14 | </defs> | ||
15 | <g id="icons" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> | ||
16 | <g id="hangoutschat"> | ||
17 | <g id="Group-11" transform="translate(6.000000, 0.000000)"> | ||
18 | <mask id="mask-2" fill="white"> | ||
19 | <use xlink:href="#path-1"></use> | ||
20 | </mask> | ||
21 | <use id="Fill-1" fill="#009585" xlink:href="#path-1"></use> | ||
22 | <polygon id="Path-2" fill="#008375" mask="url(#mask-2)" points="18.313253 46.448374 47.2572637 76.1445783 67.4698795 54.4236818 67.4698795 41.9750224 47.2572637 21.4115799 35.1746623 18.313253 24.0791919 21.4115799 18.313253 29.3940121"></polygon> | ||
23 | <g id="Fill-1" mask="url(#mask-2)"> | ||
24 | <use fill="black" fill-opacity="1" filter="url(#filter-4)" xlink:href="#path-3"></use> | ||
25 | <use fill="#F5F5F5" fill-rule="evenodd" xlink:href="#path-3"></use> | ||
26 | </g> | ||
27 | </g> | ||
28 | </g> | ||
29 | </g> | ||
30 | </svg> \ No newline at end of file | ||
diff --git a/uncompressed/hangoutschat/index.js b/uncompressed/hangoutschat/index.js new file mode 100644 index 0000000..9034d74 --- /dev/null +++ b/uncompressed/hangoutschat/index.js | |||
@@ -0,0 +1,5 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | // just pass through Franz | ||
4 | module.exports = Franz => Franz; | ||
5 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhhbmdvdXRzY2hhdC9pbmRleC5qcyJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIiwiRnJhbnoiXSwibWFwcGluZ3MiOiI7O0FBQUE7QUFDQUEsT0FBT0MsT0FBUCxHQUFpQkMsU0FBU0EsS0FBMUIiLCJmaWxlIjoiaGFuZ291dHNjaGF0L2luZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8ganVzdCBwYXNzIHRocm91Z2ggRnJhbnpcbm1vZHVsZS5leHBvcnRzID0gRnJhbnogPT4gRnJhbno7XG4iXX0= \ No newline at end of file | ||
diff --git a/uncompressed/hangoutschat/package.json b/uncompressed/hangoutschat/package.json new file mode 100644 index 0000000..93abc68 --- /dev/null +++ b/uncompressed/hangoutschat/package.json | |||
@@ -0,0 +1,14 @@ | |||
1 | { | ||
2 | "id": "hangoutschat", | ||
3 | "name": "Hangouts Chat", | ||
4 | "version": "1.0.0", | ||
5 | "description": "Hangouts Chat", | ||
6 | "main": "index.js", | ||
7 | "author": "Stefan Malzner <stefan@adlk.io>", | ||
8 | "license": "MIT", | ||
9 | "config": { | ||
10 | "serviceURL": "https://chat.google.com", | ||
11 | "hasNotificationSound": true, | ||
12 | "hasIndirectMessages": true | ||
13 | } | ||
14 | } | ||
diff --git a/uncompressed/hangoutschat/webview.js b/uncompressed/hangoutschat/webview.js new file mode 100644 index 0000000..2af9e03 --- /dev/null +++ b/uncompressed/hangoutschat/webview.js | |||
@@ -0,0 +1,30 @@ | |||
1 | 'use strict'; | ||
2 | |||
3 | module.exports = Franz => { | ||
4 | const getMessages = function getMessages() { | ||
5 | const muteSelector = '.DQy0Rb'; | ||
6 | |||
7 | // get unread messages | ||
8 | let directCount = 0; | ||
9 | document.querySelectorAll('.eM5l9e.FVKzAb').forEach(node => { | ||
10 | // Hangouts Chat overrides the muted indicator when there is a direct mention | ||
11 | if (!node.closest('content[role="listitem"]').querySelector(muteSelector)) { | ||
12 | directCount += 1; | ||
13 | } | ||
14 | }); | ||
15 | let indirectCount = 0; | ||
16 | document.querySelectorAll('.PL5Wwe.H7du2 .t5F5nf').forEach(node => { | ||
17 | if (!node.closest('content[role="listitem"]').querySelector(muteSelector)) { | ||
18 | indirectCount = +1; | ||
19 | } | ||
20 | }); | ||
21 | indirectCount -= directCount; | ||
22 | |||
23 | // set Franz badge | ||
24 | Franz.setBadge(directCount, indirectCount); | ||
25 | }; | ||
26 | |||
27 | // check for new messages every second and update Franz badge | ||
28 | Franz.loop(getMessages); | ||
29 | }; | ||
30 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhhbmdvdXRzY2hhdC93ZWJ2aWV3LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJGcmFueiIsImdldE1lc3NhZ2VzIiwibXV0ZVNlbGVjdG9yIiwiZGlyZWN0Q291bnQiLCJkb2N1bWVudCIsInF1ZXJ5U2VsZWN0b3JBbGwiLCJmb3JFYWNoIiwibm9kZSIsImNsb3Nlc3QiLCJxdWVyeVNlbGVjdG9yIiwiaW5kaXJlY3RDb3VudCIsInNldEJhZGdlIiwibG9vcCJdLCJtYXBwaW5ncyI6Ijs7QUFBQUEsT0FBT0MsT0FBUCxHQUFrQkMsS0FBRCxJQUFXO0FBQzFCLFFBQU1DLGNBQWMsU0FBU0EsV0FBVCxHQUF1QjtBQUN6QyxVQUFNQyxlQUFlLFNBQXJCOztBQUVBO0FBQ0EsUUFBSUMsY0FBYyxDQUFsQjtBQUNBQyxhQUFTQyxnQkFBVCxDQUEwQixnQkFBMUIsRUFBNENDLE9BQTVDLENBQXFEQyxJQUFELElBQVU7QUFDNUQ7QUFDQSxVQUFJLENBQUNBLEtBQUtDLE9BQUwsQ0FBYSwwQkFBYixFQUF5Q0MsYUFBekMsQ0FBdURQLFlBQXZELENBQUwsRUFBMkU7QUFDekVDLHVCQUFlLENBQWY7QUFDRDtBQUNGLEtBTEQ7QUFNQSxRQUFJTyxn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