aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/twitter-dm
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/twitter-dm
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/twitter-dm')
-rw-r--r--recipes/twitter-dm/README.md5
-rw-r--r--recipes/twitter-dm/icon.pngbin0 -> 34190 bytes
-rw-r--r--recipes/twitter-dm/icon.svg35
-rw-r--r--recipes/twitter-dm/index.js4
-rw-r--r--recipes/twitter-dm/package.json13
-rw-r--r--recipes/twitter-dm/webview.js17
6 files changed, 74 insertions, 0 deletions
diff --git a/recipes/twitter-dm/README.md b/recipes/twitter-dm/README.md
new file mode 100644
index 0000000..7c7cebe
--- /dev/null
+++ b/recipes/twitter-dm/README.md
@@ -0,0 +1,5 @@
1# Twitter DM for Franz
2This is the official Franz recipe for Twitter DM
3
4### How to create your own Franz recipes:
5* [Read the documentation](https://github.com/meetfranz/plugins)
diff --git a/recipes/twitter-dm/icon.png b/recipes/twitter-dm/icon.png
new file mode 100644
index 0000000..37af09a
--- /dev/null
+++ b/recipes/twitter-dm/icon.png
Binary files differ
diff --git a/recipes/twitter-dm/icon.svg b/recipes/twitter-dm/icon.svg
new file mode 100644
index 0000000..b7ac960
--- /dev/null
+++ b/recipes/twitter-dm/icon.svg
@@ -0,0 +1,35 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<svg
3 xmlns:dc="http://purl.org/dc/elements/1.1/"
4 xmlns:cc="http://creativecommons.org/ns#"
5 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6 xmlns:svg="http://www.w3.org/2000/svg"
7 xmlns="http://www.w3.org/2000/svg"
8 version="1.1"
9 id="svg3626"
10 viewBox="0 0 300.00006 244.18703"
11 height="300.00006"
12 width="300.00006">
13 <defs
14 id="defs3628" />
15 <metadata
16 id="metadata3631">
17 <rdf:RDF>
18 <cc:Work
19 rdf:about="">
20 <dc:format>image/svg+xml</dc:format>
21 <dc:type
22 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
23 <dc:title></dc:title>
24 </cc:Work>
25 </rdf:RDF>
26 </metadata>
27 <g
28 transform="translate(-539.17946,-568.85777)"
29 id="layer1">
30 <path
31 id="path3611"
32 style="fill:#1da1f2;fill-opacity:1;fill-rule:nonzero;stroke:none"
33 d="m 633.89823,812.04479 c 112.46038,0 173.95627,-93.16765 173.95627,-173.95625 0,-2.64628 -0.0539,-5.28062 -0.1726,-7.90305 11.93799,-8.63016 22.31446,-19.39999 30.49762,-31.65984 -10.95459,4.86937 -22.74358,8.14741 -35.11071,9.62551 12.62341,-7.56929 22.31446,-19.54304 26.88583,-33.81739 -11.81284,7.00307 -24.89517,12.09297 -38.82383,14.84055 -11.15723,-11.88436 -27.04079,-19.31655 -44.62892,-19.31655 -33.76374,0 -61.14426,27.38052 -61.14426,61.13233 0,4.79784 0.5364,9.46458 1.58538,13.94057 -50.81546,-2.55686 -95.87353,-26.88582 -126.02546,-63.87991 -5.25082,9.03545 -8.27852,19.53111 -8.27852,30.73006 0,21.21186 10.79366,39.93837 27.20766,50.89296 -10.03077,-0.30992 -19.45363,-3.06348 -27.69044,-7.64676 -0.009,0.25652 -0.009,0.50661 -0.009,0.78077 0,29.60957 21.07478,54.3319 49.0513,59.93435 -5.13757,1.40062 -10.54335,2.15158 -16.12196,2.15158 -3.93364,0 -7.76596,-0.38716 -11.49099,-1.1026 7.78383,24.2932 30.35457,41.97073 57.11525,42.46543 -20.92578,16.40207 -47.28712,26.17062 -75.93712,26.17062 -4.92898,0 -9.79834,-0.28036 -14.58427,-0.84634 27.05868,17.34379 59.18936,27.46396 93.72193,27.46396" />
34 </g>
35</svg>
diff --git a/recipes/twitter-dm/index.js b/recipes/twitter-dm/index.js
new file mode 100644
index 0000000..0d1e011
--- /dev/null
+++ b/recipes/twitter-dm/index.js
@@ -0,0 +1,4 @@
1"use strict";
2
3module.exports = Franz => Franz;
4//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInR3aXR0ZXItZG0vaW5kZXguanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIkZyYW56Il0sIm1hcHBpbmdzIjoiOztBQUFBQSxPQUFPQyxPQUFQLEdBQWlCQyxTQUFTQSxLQUExQiIsImZpbGUiOiJ0d2l0dGVyLWRtL2luZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBGcmFueiA9PiBGcmFuejtcbiJdfQ== \ No newline at end of file
diff --git a/recipes/twitter-dm/package.json b/recipes/twitter-dm/package.json
new file mode 100644
index 0000000..84711e3
--- /dev/null
+++ b/recipes/twitter-dm/package.json
@@ -0,0 +1,13 @@
1{
2 "id": "twitter-dm",
3 "name": "Twitter DM",
4 "version": "1.0.0",
5 "description": "Twitter DM",
6 "main": "index.js",
7 "author": "Pieter Levels <hi@levels.io>, Stefan Malzner <stefan@adlk.io>",
8 "license": "MIT",
9 "config": {
10 "serviceURL": "https://mobile.twitter.com/messages",
11 "hasNotificationSound": true
12 }
13}
diff --git a/recipes/twitter-dm/webview.js b/recipes/twitter-dm/webview.js
new file mode 100644
index 0000000..ef66836
--- /dev/null
+++ b/recipes/twitter-dm/webview.js
@@ -0,0 +1,17 @@
1'use strict';
2
3module.exports = Franz => {
4 const getMessages = function getMessages() {
5 let count = 0;
6 const elem = document.querySelector('a[href="/messages"] div div');
7
8 if (elem) {
9 count = parseInt(elem.innerText, 10);
10 }
11
12 Franz.setBadge(count);
13 };
14
15 Franz.loop(getMessages);
16};
17//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInR3aXR0ZXItZG0vd2Vidmlldy5qcyJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIiwiRnJhbnoiLCJnZXRNZXNzYWdlcyIsImNvdW50IiwiZWxlbSIsImRvY3VtZW50IiwicXVlcnlTZWxlY3RvciIsInBhcnNlSW50IiwiaW5uZXJUZXh0Iiwic2V0QmFkZ2UiLCJsb29wIl0sIm1hcHBpbmdzIjoiOztBQUFBQSxPQUFPQyxPQUFQLEdBQWtCQyxLQUFELElBQVc7QUFDMUIsUUFBTUMsY0FBYyxTQUFTQSxXQUFULEdBQXVCO0FBQ3pDLFFBQUlDLFFBQVEsQ0FBWjtBQUNBLFVBQU1DLE9BQU9DLFNBQVNDLGFBQVQsQ0FBdUIsNkJBQXZCLENBQWI7O0FBRUEsUUFBSUYsSUFBSixFQUFVO0FBQ1JELGNBQVFJLFNBQVNILEtBQUtJLFNBQWQsRUFBeUIsRUFBekIsQ0FBUjtBQUNEOztBQUVEUCxVQUFNUSxRQUFOLENBQWVOLEtBQWY7QUFDRCxHQVREOztBQVdBRixRQUFNUyxJQUFOLENBQVdSLFdBQVg7QUFDRCxDQWJEIiwiZmlsZSI6InR3aXR0ZXItZG0vd2Vidmlldy5qcyIsInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gKEZyYW56KSA9PiB7XG4gIGNvbnN0IGdldE1lc3NhZ2VzID0gZnVuY3Rpb24gZ2V0TWVzc2FnZXMoKSB7XG4gICAgbGV0IGNvdW50ID0gMDtcbiAgICBjb25zdCBlbGVtID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignYVtocmVmPVwiL21lc3NhZ2VzXCJdIGRpdiBkaXYnKTtcblxuICAgIGlmIChlbGVtKSB7XG4gICAgICBjb3VudCA9IHBhcnNlSW50KGVsZW0uaW5uZXJUZXh0LCAxMCk7XG4gICAgfVxuXG4gICAgRnJhbnouc2V0QmFkZ2UoY291bnQpO1xuICB9O1xuXG4gIEZyYW56Lmxvb3AoZ2V0TWVzc2FnZXMpO1xufTtcbiJdfQ== \ No newline at end of file