From 247b9c7588ab2b51c6eab41affb9696cf61110fd Mon Sep 17 00:00:00 2001 From: Guillaume Assier <18405490+Sykursen@users.noreply.github.com> Date: Wed, 15 Jun 2022 16:18:44 +0200 Subject: Adding Tchap service (#40) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: André Oliveira --- recipes/tchap/icon.svg | 9 +++++++++ recipes/tchap/index.js | 1 + recipes/tchap/package.json | 10 ++++++++++ recipes/tchap/webview.js | 8 ++++++++ 4 files changed, 28 insertions(+) create mode 100644 recipes/tchap/icon.svg create mode 100644 recipes/tchap/index.js create mode 100644 recipes/tchap/package.json create mode 100644 recipes/tchap/webview.js (limited to 'recipes') diff --git a/recipes/tchap/icon.svg b/recipes/tchap/icon.svg new file mode 100644 index 0000000..20a362a --- /dev/null +++ b/recipes/tchap/icon.svg @@ -0,0 +1,9 @@ + + + Layer 1 + + + + + + \ No newline at end of file diff --git a/recipes/tchap/index.js b/recipes/tchap/index.js new file mode 100644 index 0000000..8244b1b --- /dev/null +++ b/recipes/tchap/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; \ No newline at end of file diff --git a/recipes/tchap/package.json b/recipes/tchap/package.json new file mode 100644 index 0000000..a9425fc --- /dev/null +++ b/recipes/tchap/package.json @@ -0,0 +1,10 @@ +{ + "id": "tchap", + "name": "Tchap", + "version": "1.0.0", + "license": "MIT", + "repository": "https://github.com/Sykursen/recipe-tchap/", + "config": { + "serviceURL": "https://www.tchap.gouv.fr/" + } + } \ No newline at end of file diff --git a/recipes/tchap/webview.js b/recipes/tchap/webview.js new file mode 100644 index 0000000..bc24fe6 --- /dev/null +++ b/recipes/tchap/webview.js @@ -0,0 +1,8 @@ +module.exports = Ferdium => { + const getMessages = () => { + let count = document.querySelector('.mx_RoomSubList_badge').innerHTML + Ferdium.setBadge(count); + }; + + Ferdium.loop(getMessages); +}; \ No newline at end of file -- cgit v1.2.3-70-g09d2