aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/twitch
diff options
context:
space:
mode:
authorLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-08-27 18:13:24 +0530
committerLibravatar GitHub <noreply@github.com>2021-08-27 18:13:24 +0530
commit155c4b832281348c16be1f4ef667e6e23dbf1bd8 (patch)
treed144e2de2e6c7fb2e334246e8a4aecdbeb08ef8d /recipes/twitch
parentdocs: fixed template file for creating recipe. (diff)
downloadferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.tar.gz
ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.tar.zst
ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.zip
chore: normalized all recipes to ensure compatibility with es6 (#639)
- Removed some calls to set badge with '0' all the time. - Removed all 'sourceMaps' since they are all outdated atm.
Diffstat (limited to 'recipes/twitch')
-rw-r--r--recipes/twitch/index.js4
-rw-r--r--recipes/twitch/package.json2
-rw-r--r--recipes/twitch/webview.js11
3 files changed, 6 insertions, 11 deletions
diff --git a/recipes/twitch/index.js b/recipes/twitch/index.js
index 7d05620..23607bd 100644
--- a/recipes/twitch/index.js
+++ b/recipes/twitch/index.js
@@ -1,3 +1 @@
1// just pass through Franz module.exports = Ferdi => Ferdi;
2module.exports = Franz => Franz;
3// # sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInR3aXRjaC9pbmRleC5qcyJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIiwiRnJhbnoiXSwibWFwcGluZ3MiOiI7O0FBQUE7QUFDQUEsT0FBT0MsT0FBUCxHQUFpQkMsU0FBU0EsS0FBMUIiLCJmaWxlIjoidHdpdGNoL2luZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8ganVzdCBwYXNzIHRocm91Z2ggRnJhbnpcbm1vZHVsZS5leHBvcnRzID0gRnJhbnogPT4gRnJhbno7XG4iXX0=
diff --git a/recipes/twitch/package.json b/recipes/twitch/package.json
index efb0312..7192484 100644
--- a/recipes/twitch/package.json
+++ b/recipes/twitch/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "twitch", 2 "id": "twitch",
3 "name": "Twitch", 3 "name": "Twitch",
4 "version": "1.0.2", 4 "version": "1.1.0",
5 "license": "MIT", 5 "license": "MIT",
6 "config": { 6 "config": {
7 "serviceURL": "https://www.twitch.tv/{teamId}/chat", 7 "serviceURL": "https://www.twitch.tv/{teamId}/chat",
diff --git a/recipes/twitch/webview.js b/recipes/twitch/webview.js
index 8a6ba8e..697efa6 100644
--- a/recipes/twitch/webview.js
+++ b/recipes/twitch/webview.js
@@ -1,11 +1,8 @@
1module.exports = (Franz, options) => { 1module.exports = (Ferdi) => {
2 const getMessages = () => { 2 const getMessages = () => {
3 // Get the number of mentions
4 const mentions = document.querySelectorAll('.chat-line .mentioned').length; 3 const mentions = document.querySelectorAll('.chat-line .mentioned').length;
5 4 Ferdi.setBadge(mentions, 0);
6 Franz.setBadge(mentions, 0);
7 }; 5 };
8 // check for new messages every second and update Franz badge 6
9 Franz.loop(getMessages); 7 Ferdi.loop(getMessages);
10}; 8};
11// # sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInR3aXRjaC93ZWJ2aWV3LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJGcmFueiIsIm9wdGlvbnMiLCJnZXRNZXNzYWdlcyIsIm1lbnRpb25zIiwiZG9jdW1lbnQiLCJxdWVyeVNlbGVjdG9yQWxsIiwibGVuZ3RoIiwic2V0QmFkZ2UiLCJsb29wIl0sIm1hcHBpbmdzIjoiOztBQUFBQSxPQUFPQyxPQUFQLEdBQWlCLENBQUNDLEtBQUQsRUFBUUMsT0FBUixLQUFvQjtBQUNuQyxRQUFNQyxjQUFjLE1BQU07QUFDeEI7QUFDQSxVQUFNQyxXQUFXQyxTQUFTQyxnQkFB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