diff options
Diffstat (limited to 'recipes/tchap')
-rw-r--r-- | recipes/tchap/index.js | 2 | ||||
-rw-r--r-- | recipes/tchap/package.json | 4 | ||||
-rw-r--r-- | recipes/tchap/webview.js | 12 |
3 files changed, 13 insertions, 5 deletions
diff --git a/recipes/tchap/index.js b/recipes/tchap/index.js index 8244b1b..dd41f72 100644 --- a/recipes/tchap/index.js +++ b/recipes/tchap/index.js | |||
@@ -1 +1 @@ | |||
module.exports = Ferdium => Ferdium; \ No newline at end of file | module.exports = Ferdium => Ferdium; | ||
diff --git a/recipes/tchap/package.json b/recipes/tchap/package.json index a9425fc..cff6893 100644 --- a/recipes/tchap/package.json +++ b/recipes/tchap/package.json | |||
@@ -1,10 +1,10 @@ | |||
1 | { | 1 | { |
2 | "id": "tchap", | 2 | "id": "tchap", |
3 | "name": "Tchap", | 3 | "name": "Tchap", |
4 | "version": "1.0.0", | 4 | "version": "1.1.0", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "repository": "https://github.com/Sykursen/recipe-tchap/", | 6 | "repository": "https://github.com/Sykursen/recipe-tchap/", |
7 | "config": { | 7 | "config": { |
8 | "serviceURL": "https://www.tchap.gouv.fr/" | 8 | "serviceURL": "https://www.tchap.gouv.fr/" |
9 | } | 9 | } |
10 | } \ No newline at end of file | 10 | } |
diff --git a/recipes/tchap/webview.js b/recipes/tchap/webview.js index bc24fe6..cd5b4a5 100644 --- a/recipes/tchap/webview.js +++ b/recipes/tchap/webview.js | |||
@@ -1,8 +1,16 @@ | |||
1 | function _interopRequireDefault(obj) { | ||
2 | return obj && obj.__esModule ? obj : { default: obj }; | ||
3 | } | ||
4 | |||
5 | const _path = _interopRequireDefault(require('path')); | ||
6 | |||
1 | module.exports = Ferdium => { | 7 | module.exports = Ferdium => { |
2 | const getMessages = () => { | 8 | const getMessages = () => { |
3 | let count = document.querySelector('.mx_RoomSubList_badge').innerHTML | 9 | const count = document.querySelector('.mx_RoomSubList_badge').innerHTML; |
4 | Ferdium.setBadge(count); | 10 | Ferdium.setBadge(count); |
5 | }; | 11 | }; |
6 | 12 | ||
7 | Ferdium.loop(getMessages); | 13 | Ferdium.loop(getMessages); |
8 | }; \ No newline at end of file | 14 | |
15 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); | ||
16 | }; | ||