aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/telegram/webview.js
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/telegram/webview.js
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/telegram/webview.js')
-rw-r--r--recipes/telegram/webview.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/recipes/telegram/webview.js b/recipes/telegram/webview.js
index db8c8d7..bf9ffec 100644
--- a/recipes/telegram/webview.js
+++ b/recipes/telegram/webview.js
@@ -1,8 +1,10 @@
1// Code copied from: https://gitlab.com/gortega4/ferdi_recipes 1// Code copied from: https://gitlab.com/gortega4/ferdi_recipes
2 2
3const path = require('path'); 3const _path = _interopRequireDefault(require('path'));
4 4
5module.exports = Franz => { 5function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6
7module.exports = Ferdi => {
6 const getMessages = function getMessages() { 8 const getMessages = function getMessages() {
7 let count = 0; 9 let count = 0;
8 let count_sec = 0; 10 let count_sec = 0;
@@ -21,9 +23,10 @@ module.exports = Franz => {
21 } 23 }
22 } 24 }
23 25
24 Franz.setBadge(count, count_sec); 26 Ferdi.setBadge(count, count_sec);
25 }; 27 };
26 28
27 Franz.injectCSS(path.join(__dirname, 'service.css')); 29 Ferdi.loop(getMessages);
28 Franz.loop(getMessages); 30
31 Ferdi.injectCSS(_path.default.join(__dirname, 'service.css'));
29}; 32};