diff options
author | vantezzen <hello@vantezzen.io> | 2020-01-14 20:47:35 +0100 |
---|---|---|
committer | vantezzen <hello@vantezzen.io> | 2020-01-14 20:47:35 +0100 |
commit | d003cb9d863070e364bf02f083ba80291ef04a4b (patch) | |
tree | cc22c82b30ed6adb3382827394267bbbb16ff979 /uncompressed/mastodon | |
parent | Add github script (diff) | |
download | ferdium-recipes-d003cb9d863070e364bf02f083ba80291ef04a4b.tar.gz ferdium-recipes-d003cb9d863070e364bf02f083ba80291ef04a4b.tar.zst ferdium-recipes-d003cb9d863070e364bf02f083ba80291ef04a4b.zip |
Add habitica and mastodon
Diffstat (limited to 'uncompressed/mastodon')
-rw-r--r-- | uncompressed/mastodon/README.md | 5 | ||||
-rw-r--r-- | uncompressed/mastodon/icon.png | bin | 0 -> 14344 bytes | |||
-rw-r--r-- | uncompressed/mastodon/icon.svg | 22 | ||||
-rw-r--r-- | uncompressed/mastodon/index.js | 14 | ||||
-rw-r--r-- | uncompressed/mastodon/package.json | 24 | ||||
-rwxr-xr-x | uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/LICENSE | 21 | ||||
-rwxr-xr-x | uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/README.md | 5 | ||||
-rw-r--r-- | uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/icon.png | bin | 0 -> 5283 bytes | |||
-rwxr-xr-x | uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/icon.svg | 34 | ||||
-rwxr-xr-x | uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/index.js | 3 | ||||
-rwxr-xr-x | uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/package.json | 13 | ||||
-rwxr-xr-x | uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/webview.js | 3 | ||||
-rw-r--r-- | uncompressed/mastodon/webview.js | 28 |
13 files changed, 172 insertions, 0 deletions
diff --git a/uncompressed/mastodon/README.md b/uncompressed/mastodon/README.md new file mode 100644 index 0000000..04fca53 --- /dev/null +++ b/uncompressed/mastodon/README.md | |||
@@ -0,0 +1,5 @@ | |||
1 | # franz-plugin-mastodon | ||
2 | |||
3 | [franz](http://meetfranz.com/) integration for [Mastodon](https://github.com/tootsuite/mastodon). | ||
4 | |||
5 | see http://qiita.com/kan/items/571b2f56c54e1e3b6516 | ||
diff --git a/uncompressed/mastodon/icon.png b/uncompressed/mastodon/icon.png new file mode 100644 index 0000000..3a475f6 --- /dev/null +++ b/uncompressed/mastodon/icon.png | |||
Binary files differ | |||
diff --git a/uncompressed/mastodon/icon.svg b/uncompressed/mastodon/icon.svg new file mode 100644 index 0000000..f44ec3f --- /dev/null +++ b/uncompressed/mastodon/icon.svg | |||
@@ -0,0 +1,22 @@ | |||
1 | <?xml version="1.0" standalone="no"?> | ||
2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" | ||
3 | "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> | ||
4 | <svg version="1.0" xmlns="http://www.w3.org/2000/svg" | ||
5 | width="192.000000pt" height="192.000000pt" viewBox="0 0 192.000000 192.000000" | ||
6 | preserveAspectRatio="xMidYMid meet"> | ||
7 | <metadata> | ||
8 | Created by potrace 1.14, written by Peter Selinger 2001-2017 | ||
9 | </metadata> | ||
10 | <g transform="translate(0.000000,192.000000) scale(0.100000,-0.100000)" | ||
11 | fill="#000000" stroke="none"> | ||
12 | <path d="M0 960 l0 -960 960 0 960 0 0 960 0 960 -960 0 -960 0 0 -960z m1123 | ||
13 | 378 c-15 -28 -19 -69 -23 -273 -5 -257 -7 -264 -61 -309 -25 -21 -41 -26 -84 | ||
14 | -26 -46 0 -59 5 -90 31 -51 45 -57 77 -53 311 3 189 5 209 23 234 39 51 79 64 | ||
15 | 198 64 l108 0 -18 -32z m-574 -86 c14 -10 35 -34 46 -53 18 -31 20 -57 25 | ||
16 | -269 3 -161 9 -242 18 -257 6 -12 12 -24 12 -27 0 -3 -50 -6 -110 -6 -125 0 | ||
17 | -154 10 -192 62 -22 31 -23 43 -26 227 -4 223 -1 249 35 292 51 60 135 74 192 | ||
18 | 31z m970 1 c64 -48 66 -56 69 -278 3 -186 1 -209 -17 -250 -31 -71 -64 -85 | ||
19 | -198 -85 -62 0 -113 2 -113 4 0 2 7 20 15 39 12 28 15 83 15 244 1 216 8 261 | ||
20 | 47 305 44 49 130 59 182 21z"/> | ||
21 | </g> | ||
22 | </svg> | ||
diff --git a/uncompressed/mastodon/index.js b/uncompressed/mastodon/index.js new file mode 100644 index 0000000..561bb58 --- /dev/null +++ b/uncompressed/mastodon/index.js | |||
@@ -0,0 +1,14 @@ | |||
1 | module.exports = (Franz) => { | ||
2 | class Mastodon extends Franz { | ||
3 | validateServer(URL) { | ||
4 | const api = `${URL}`; | ||
5 | return new Promise((resolve, reject) => { | ||
6 | $.get(api, (resp) => { | ||
7 | resolve(); | ||
8 | }).fail(reject); | ||
9 | }); | ||
10 | } | ||
11 | } | ||
12 | |||
13 | return Mastodon; | ||
14 | }; | ||
diff --git a/uncompressed/mastodon/package.json b/uncompressed/mastodon/package.json new file mode 100644 index 0000000..bd72fbd --- /dev/null +++ b/uncompressed/mastodon/package.json | |||
@@ -0,0 +1,24 @@ | |||
1 | { | ||
2 | "name": "Mastodon", | ||
3 | "id": "mastodon", | ||
4 | "version": "1.1.0", | ||
5 | "description": "micro blog", | ||
6 | "main": "index.js", | ||
7 | "author": "The Ferdi Team <hello@getferdi.com> and Kan Fushihara <kan.fushihara@gmail.com>", | ||
8 | "license": "MIT", | ||
9 | "config": { | ||
10 | "serviceURL": "", | ||
11 | "serviceName": "Mastodon", | ||
12 | "message": "", | ||
13 | "popup": [], | ||
14 | "hasNotificationSound": true, | ||
15 | "hasIndirectMessages": false, | ||
16 | "hasTeamID": true, | ||
17 | "customURL": true, | ||
18 | "hostedOnly": true, | ||
19 | "webviewOptions": { | ||
20 | "disablewebsecurity": "" | ||
21 | }, | ||
22 | "openDevTools": false | ||
23 | } | ||
24 | } | ||
diff --git a/uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/LICENSE b/uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/LICENSE new file mode 100755 index 0000000..95f7444 --- /dev/null +++ b/uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/LICENSE | |||
@@ -0,0 +1,21 @@ | |||
1 | MIT License | ||
2 | |||
3 | Copyright (c) 2017 Yuriy Badalyantc | ||
4 | |||
5 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
6 | of this software and associated documentation files (the "Software"), to deal | ||
7 | in the Software without restriction, including without limitation the rights | ||
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
9 | copies of the Software, and to permit persons to whom the Software is | ||
10 | furnished to do so, subject to the following conditions: | ||
11 | |||
12 | The above copyright notice and this permission notice shall be included in all | ||
13 | copies or substantial portions of the Software. | ||
14 | |||
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
21 | SOFTWARE. \ No newline at end of file | ||
diff --git a/uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/README.md b/uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/README.md new file mode 100755 index 0000000..36ba2d0 --- /dev/null +++ b/uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/README.md | |||
@@ -0,0 +1,5 @@ | |||
1 | # Habitica for Franz | ||
2 | This is the Franz recipe for [Habitica](https://habitica.com) | ||
3 | |||
4 | ### How to create your own Franz recipes: | ||
5 | * [Read the documentation](https://github.com/meetfranz/plugins) | ||
diff --git a/uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/icon.png b/uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/icon.png new file mode 100644 index 0000000..094734b --- /dev/null +++ b/uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/icon.png | |||
Binary files differ | |||
diff --git a/uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/icon.svg b/uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/icon.svg new file mode 100755 index 0000000..6cbda6a --- /dev/null +++ b/uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/icon.svg | |||
@@ -0,0 +1,34 @@ | |||
1 | <?xml version="1.0" standalone="no"?> | ||
2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" | ||
3 | "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> | ||
4 | <svg version="1.0" xmlns="http://www.w3.org/2000/svg" | ||
5 | width="438.000000pt" height="458.000000pt" viewBox="0 0 438.000000 458.000000" | ||
6 | preserveAspectRatio="xMidYMid meet"> | ||
7 | <metadata> | ||
8 | Created by potrace 1.15, written by Peter Selinger 2001-2017 | ||
9 | </metadata> | ||
10 | <g transform="translate(0.000000,458.000000) scale(0.100000,-0.100000)" | ||
11 | fill="#000000" stroke="none"> | ||
12 | <path d="M1519 4480 c-1197 -89 -1309 -99 -1355 -119 -67 -30 -120 -84 -144 | ||
13 | -148 -20 -53 -20 -80 -20 -1532 0 -1455 0 -1479 20 -1536 25 -73 69 -152 128 | ||
14 | -230 331 -437 641 -832 675 -856 60 -43 125 -59 246 -59 58 0 770 40 1581 90 | ||
15 | 1659 100 1572 91 1655 175 81 80 75 -56 75 1794 l0 1646 -24 36 c-30 44 -44 | ||
16 | 54 -609 452 -443 313 -513 357 -598 376 -89 21 -353 6 -1630 -89z m1580 -171 | ||
17 | c78 -18 142 -56 381 -229 239 -173 288 -216 273 -231 -12 -12 -2632 -171 | ||
18 | -2753 -167 -74 2 -105 8 -141 26 -43 21 -449 337 -463 361 -12 19 4 48 32 60 | ||
19 | 32 13 2361 188 2522 190 58 0 125 -4 149 -10z m906 -783 c19 -8 41 -29 52 -48 | ||
20 | 17 -31 18 -99 18 -1438 0 -1385 0 -1406 -20 -1445 -14 -28 -33 -46 -65 -62 | ||
21 | -43 -21 -109 -26 -1435 -103 -765 -44 -1419 -80 -1455 -80 -84 0 -147 29 -172 | ||
22 | 80 -17 33 -18 122 -18 1433 0 1185 2 1403 14 1432 18 42 62 66 135 72 53 5 | ||
23 | 2808 169 2879 172 18 0 48 -5 67 -13z"/> | ||
24 | <path d="M3305 3028 c-341 -21 -361 -25 -402 -87 -14 -20 -23 -49 -23 -71 l0 | ||
25 | -38 115 -12 115 -12 0 -617 0 -616 -48 75 c-206 319 -846 1297 -855 1306 -9 8 | ||
26 | -102 5 -335 -12 -367 -25 -380 -27 -417 -56 -33 -26 -64 -91 -65 -134 0 -27 4 | ||
27 | -32 31 -38 17 -3 48 -6 69 -6 20 0 58 -3 84 -6 l46 -7 -2 -875 -3 -876 -87 | ||
28 | -26 c-104 -30 -128 -50 -136 -115 l-5 -48 99 7 c54 3 213 13 353 21 293 17 | ||
29 | 322 25 366 99 14 24 25 49 25 57 0 10 -40 23 -138 45 l-137 30 -3 657 c-1 361 | ||
30 | 1 657 5 657 5 0 203 -309 442 -685 260 -411 456 -709 489 -745 73 -82 115 | ||
31 | -102 211 -102 83 -1 153 16 255 62 l66 29 0 980 c0 924 1 980 18 985 9 3 46 | ||
32 | 10 81 17 91 17 115 41 116 114 0 32 -4 59 -10 60 -5 1 -149 -6 -320 -17z"/> | ||
33 | </g> | ||
34 | </svg> | ||
diff --git a/uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/index.js b/uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/index.js new file mode 100755 index 0000000..17daa35 --- /dev/null +++ b/uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/index.js | |||
@@ -0,0 +1,3 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Franz => Franz; | ||
diff --git a/uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/package.json b/uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/package.json new file mode 100755 index 0000000..13f36bd --- /dev/null +++ b/uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/package.json | |||
@@ -0,0 +1,13 @@ | |||
1 | { | ||
2 | "id": "habitica", | ||
3 | "name": "Habitica", | ||
4 | "version": "1.0.0", | ||
5 | "description": "Habitica", | ||
6 | "main": "index.js", | ||
7 | "license": "MIT", | ||
8 | "author": "Yuriy Badalyantc <lmnet89@gmail.com>", | ||
9 | "repository": "https://github.com/lmnet/franz-recipe-notion", | ||
10 | "config": { | ||
11 | "serviceURL": "https://habitica.com" | ||
12 | } | ||
13 | } | ||
diff --git a/uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/webview.js b/uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/webview.js new file mode 100755 index 0000000..17daa35 --- /dev/null +++ b/uncompressed/mastodon/rjbernaldo-franz-recipe-habitica-0eb648d/webview.js | |||
@@ -0,0 +1,3 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Franz => Franz; | ||
diff --git a/uncompressed/mastodon/webview.js b/uncompressed/mastodon/webview.js new file mode 100644 index 0000000..d3644e8 --- /dev/null +++ b/uncompressed/mastodon/webview.js | |||
@@ -0,0 +1,28 @@ | |||
1 | module.exports = (Franz, options) => { | ||
2 | let latestStatement = $('.status time').attr('datetime'); | ||
3 | let latestNotify = $($('.notification__message span').get(0)).text(); | ||
4 | |||
5 | $($('div.column div.scrollable').get(0)).on('scroll', (ev) => { | ||
6 | latestStatement = $('.status time').attr('datetime'); | ||
7 | }); | ||
8 | $($('div.column div.scrollable').get(1)).on('scroll', (ev) => { | ||
9 | latestNotify = $($('.notification__message span').get(0)).text(); | ||
10 | }); | ||
11 | |||
12 | function getMessages() { | ||
13 | var reply = 0; | ||
14 | const ln = $($('.notification__message span').get(0)).text(); | ||
15 | if (ln != latestNotify) { | ||
16 | reply = 1; | ||
17 | } | ||
18 | var unread = 0; | ||
19 | const ls = $('.status time').attr('datetime'); | ||
20 | if (ls != latestStatement) { | ||
21 | unread = 1; | ||
22 | } | ||
23 | |||
24 | Franz.setBadge(reply, unread); | ||
25 | } | ||
26 | |||
27 | Franz.loop(getMessages); | ||
28 | } | ||