diff options
Diffstat (limited to 'uncompressed/wechat')
-rw-r--r-- | uncompressed/wechat/LICENSE | 21 | ||||
-rw-r--r-- | uncompressed/wechat/README.md | 26 | ||||
-rw-r--r-- | uncompressed/wechat/icon.png | bin | 56714 -> 0 bytes | |||
-rw-r--r-- | uncompressed/wechat/icon.svg | 1 | ||||
-rw-r--r-- | uncompressed/wechat/index.js | 6 | ||||
-rw-r--r-- | uncompressed/wechat/package.json | 15 | ||||
-rw-r--r-- | uncompressed/wechat/service.css | 9 | ||||
-rw-r--r-- | uncompressed/wechat/webview.js | 34 |
8 files changed, 0 insertions, 112 deletions
diff --git a/uncompressed/wechat/LICENSE b/uncompressed/wechat/LICENSE deleted file mode 100644 index eee14ce..0000000 --- a/uncompressed/wechat/LICENSE +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | MIT License | ||
2 | |||
3 | Copyright (c) 2017 Koma | ||
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. | ||
diff --git a/uncompressed/wechat/README.md b/uncompressed/wechat/README.md deleted file mode 100644 index 962f0da..0000000 --- a/uncompressed/wechat/README.md +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | |||
2 | Recipe for [WeChat](https://www.wechat.com) integration with [Franz 5](http://meetfranz.com) | ||
3 | |||
4 | ## To test this dev release | ||
5 | |||
6 | 1. Clone/download the folder `recipe-wechat`. | ||
7 | |||
8 | 2. Open the Franz Recipe folder on your machine: | ||
9 | * Mac: `~/Library/Application Support/Franz/recipes/` | ||
10 | * Windows: `%appdata%/Franz/recipes/` | ||
11 | * Linux: `~/.config/Franz/recipes/` | ||
12 | |||
13 | 3. Create a `dev` folder if you have not already done so | ||
14 | |||
15 | 3. Unzip and copy the `recipe-wechat` folder into the recipes dev directory | ||
16 | |||
17 | 4. Restart Franz | ||
18 | |||
19 | ## How to create your own Franz recipes: | ||
20 | [Read the documentation](https://github.com/meetfranz/plugins) | ||
21 | |||
22 | ## WeChat logo resources | ||
23 | Uses unofficial logos acquired from https://github.com/RayPS/WeChat-Logo | ||
24 | |||
25 | ## Authors | ||
26 | [Koma](https://github.com/koma-private/) | ||
diff --git a/uncompressed/wechat/icon.png b/uncompressed/wechat/icon.png deleted file mode 100644 index 317e2d7..0000000 --- a/uncompressed/wechat/icon.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/uncompressed/wechat/icon.svg b/uncompressed/wechat/icon.svg deleted file mode 100644 index e494f53..0000000 --- a/uncompressed/wechat/icon.svg +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | <svg width="1024" height="1024" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="a"><stop stop-color="#00E222" offset="0%"/><stop stop-color="#00C31D" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path d="M357.01 0h309.98c102.802 0 154.19 0 209.528 17.493a217.48 217.48 0 0 1 129.989 129.989C1024 202.812 1024 254.217 1024 357.009v309.982c0 102.801 0 154.189-17.493 209.527a217.445 217.445 0 0 1-129.989 129.98C821.18 1024 769.792 1024 666.991 1024H357.009c-102.801 0-154.197 0-209.527-17.502a217.445 217.445 0 0 1-129.989-129.98C0 821.18 0 769.792 0 666.991V357.009c0-102.792 0-154.197 17.493-209.527A217.48 217.48 0 0 1 147.482 17.493C202.812 0 254.208 0 357.009 0" fill="url(#a)"/><path d="M760 576c18.778 0 34-15.222 34-34s-15.222-34-34-34-34 15.222-34 34 15.222 34 34 34zm-166 0c18.778 0 34-15.222 34-34s-15.222-34-34-34-34 15.222-34 34 15.222 34 34 34zm-95-197c22.091 0 40-17.909 40-40s-17.909-40-40-40c-22.092 0-40 17.909-40 40s17.908 40 40 40zm-201 0c22.091 0 40-17.909 40-40s-17.909-40-40-40c-22.09 0-40 17.909-40 40s17.91 40 40 40zm478.857 428.16c-4.248-2.46-9.32-3.021-14.018-1.601-26.635 8.05-55.373 12.44-85.339 12.44C539.153 818 427 724.428 427 609c0-115.427 112.153-209 250.5-209C815.847 400 928 493.572 928 609c0 63.757-34.217 120.846-88.164 159.18a12.772 12.772 0 0 0-4.947 13.65l11.792 44.985c3.531 13.468-3.439 18.779-15.488 11.803l-54.336-31.457zM297.553 655.417c31.696 9.44 65.85 14.582 101.447 14.582 5.431 0 10.827-.119 16.187-.356C408.55 650.038 405 629.361 405 608c0-125.92 123.346-228 275.5-228 5.32 0 10.604.125 15.85.371C673.775 260.61 549.242 169 399 169 232.762 169 98 281.151 98 419.5c0 76.051 40.724 144.188 105.013 190.13 6.053 4.325 8.825 11.923 6.9 19.11l-14.149 52.79c-4.27 15.933 3.891 22.166 18.136 13.848l64.453-37.633c5.806-3.39 12.756-4.249 19.2-2.328z" fill="#FFF"/></g></svg> \ No newline at end of file | ||
diff --git a/uncompressed/wechat/index.js b/uncompressed/wechat/index.js deleted file mode 100644 index 37c403f..0000000 --- a/uncompressed/wechat/index.js +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | 'use strict'; | ||
2 | |||
3 | // just pass through Franz | ||
4 | |||
5 | module.exports = Franz => Franz; | ||
6 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlY2hhdC9pbmRleC5qcyJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIiwiRnJhbnoiXSwibWFwcGluZ3MiOiJBQUFBOztBQUVBOztBQUNBQSxPQUFPQyxPQUFQLEdBQWlCQyxTQUFTQSxLQUExQiIsImZpbGUiOiJ3ZWNoYXQvaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbi8vIGp1c3QgcGFzcyB0aHJvdWdoIEZyYW56XG5tb2R1bGUuZXhwb3J0cyA9IEZyYW56ID0+IEZyYW56OyJdfQ== \ No newline at end of file | ||
diff --git a/uncompressed/wechat/package.json b/uncompressed/wechat/package.json deleted file mode 100644 index 85ad7e9..0000000 --- a/uncompressed/wechat/package.json +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | { | ||
2 | "id": "wechat", | ||
3 | "name": "WeChat", | ||
4 | "version": "1.0.1", | ||
5 | "description": "Instant messaging", | ||
6 | "main": "index.js", | ||
7 | "author": "Koma", | ||
8 | "license": "MIT", | ||
9 | "repository": "https://github.com/koma-private/recipe-wechat", | ||
10 | "config": { | ||
11 | "hasNotificationSound": true, | ||
12 | "hasIndirectMessages": true, | ||
13 | "serviceURL": "https://web.wechat.com/" | ||
14 | } | ||
15 | } \ No newline at end of file | ||
diff --git a/uncompressed/wechat/service.css b/uncompressed/wechat/service.css deleted file mode 100644 index 0e45c65..0000000 --- a/uncompressed/wechat/service.css +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | .main { | ||
2 | padding-top: 0; | ||
3 | height: 100vh; | ||
4 | } | ||
5 | |||
6 | .main_inner { | ||
7 | margin: 0; | ||
8 | max-width: 100%; | ||
9 | } | ||
diff --git a/uncompressed/wechat/webview.js b/uncompressed/wechat/webview.js deleted file mode 100644 index 8b81a33..0000000 --- a/uncompressed/wechat/webview.js +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | 'use strict'; | ||
2 | |||
3 | const path = require('path'); | ||
4 | |||
5 | module.exports = (Franz, options) => { | ||
6 | function getMessages() { | ||
7 | let directCount = 0; | ||
8 | let indirectCount = 0; | ||
9 | let chat_item = document.querySelectorAll('div.chat_item'); | ||
10 | |||
11 | Array.prototype.forEach.call(chat_item, function (item) { | ||
12 | let count = 0; | ||
13 | let reddot = item.querySelector("i.web_wechat_reddot_middle"); | ||
14 | let avatarImage = item.querySelector("img.img"); | ||
15 | |||
16 | if (reddot && reddot.innerText) { | ||
17 | count = parseInt(reddot.innerText); | ||
18 | } | ||
19 | |||
20 | if (avatarImage && avatarImage.getAttribute("src").search("webwxgeticon") != -1) { | ||
21 | directCount += count; | ||
22 | } else { | ||
23 | indirectCount += count; | ||
24 | } | ||
25 | }); | ||
26 | |||
27 | Franz.setBadge(directCount, indirectCount); | ||
28 | } | ||
29 | |||
30 | Franz.injectCSS(path.join(__dirname, 'service.css')); | ||
31 | |||
32 | Franz.loop(getMessages); | ||
33 | }; | ||
34 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlY2hhdC93ZWJ2aWV3LmpzIl0sIm5hbWVzIjpbInBhdGgiLCJyZXF1aXJlIiwibW9kdWxlIiwiZXhwb3J0cyIsIkZyYW56Iiwib3B0aW9ucyIsImdldE1lc3NhZ2VzIiwiZGlyZWN0Q291bnQiLCJpbmRpcmVjdENvdW50IiwiY2hhdF9pdGVtIiwiZG9jdW1lbnQiLCJxdWVyeVNlbGVjdG9yQWxsIiwiQXJyYXkiLCJwcm90b3R5cGUiLCJmb3JFYWNoIiwiY2FsbCIsIml0ZW0iLCJjb3VudCIsInJlZGRvdCIsInF1ZXJ5U2VsZWN0b3IiLCJh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