diff options
author | 2021-08-27 18:13:24 +0530 | |
---|---|---|
committer | 2021-08-27 18:13:24 +0530 | |
commit | 155c4b832281348c16be1f4ef667e6e23dbf1bd8 (patch) | |
tree | d144e2de2e6c7fb2e334246e8a4aecdbeb08ef8d /recipes/gadugadu/webview.js | |
parent | docs: fixed template file for creating recipe. (diff) | |
download | ferdium-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/gadugadu/webview.js')
-rw-r--r-- | recipes/gadugadu/webview.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/recipes/gadugadu/webview.js b/recipes/gadugadu/webview.js index 50b5c02..e1c7a2a 100644 --- a/recipes/gadugadu/webview.js +++ b/recipes/gadugadu/webview.js | |||
@@ -1,6 +1,8 @@ | |||
1 | const path = require('path'); | 1 | const _path = _interopRequireDefault(require('path')); |
2 | 2 | ||
3 | module.exports = Franz => { | 3 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
4 | |||
5 | module.exports = Ferdi => { | ||
4 | const getMessages = () => { | 6 | const getMessages = () => { |
5 | const updates = parseInt(document.querySelector('i#sr-last-counter').textContent, 10); | 7 | const updates = parseInt(document.querySelector('i#sr-last-counter').textContent, 10); |
6 | let messages = 0; | 8 | let messages = 0; |
@@ -14,10 +16,10 @@ module.exports = Franz => { | |||
14 | } | 16 | } |
15 | } | 17 | } |
16 | 18 | ||
17 | Franz.setBadge(messages, updates); | 19 | Ferdi.setBadge(messages, updates); |
18 | }; | 20 | }; |
19 | 21 | ||
20 | Franz.injectCSS(path.join(__dirname, 'service.css')); | 22 | Ferdi.loop(getMessages); |
21 | Franz.loop(getMessages); | 23 | |
24 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); | ||
22 | }; | 25 | }; |
23 | // # sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImdhZHVnYWR1L3dlYnZpZXcuanMiXSwibmFtZXMiOlsicGF0aCIsInJlcXVpcmUiLCJtb2R1bGUiLCJleHBvcnRzIiwiRnJhbnoiLCJnZXRNZXNzYWdlcyIsInVwZGF0ZXMiLCJwYXJzZUludCIsImRvY3VtZW50IiwicXVlcnlTZWxlY3RvciIsInRleHRDb250ZW50IiwibWVzc2FnZXMiLCJjb252ZXJzYXRpb25zIiwicXVlcnlTZWxlY3RvckFsbCIsImxlbmd0aCIsImkiLCJzZXRCYWRnZSIsImluamVjdENTUyIsImpvaW4iLCJfX2Rpcm5hbWUiLCJsb29wIl0sIm1hcHBpbmdzIjoiOztBQUFBLE1BQU1BLE9BQU9DLFFBQVEsTUFBUixDQUFiOztBQUVBQyxPQUFPQyxPQUFQLEdBQWtCQyxLQUFELElBQVc7QUFDMUIsUUFBTUMsY0FBYyxNQUFNO0FBQ3hCLFVBQU1DLFVBQVVDLFNBQVNDLFNBQVNDLGFBQVQsQ0FBdUIsbUJBQXZCLEVBQTRDQyxXQUFyRCxFQUFrRSxFQUFsRSxDQUFoQjtBQUNBLFFBQUlDLFdBQVcsQ0FBZjs7QUFFQSxVQUFNQyxnQkFBZ0JKLFNBQVNLLGdCQUFULENBQTBCLDRCQUExQixFQUF3REMsTUFBOUU7QUFDQSxRQUFJRixrQkFBa0IsQ0FBdEIsRUFBeUI7QUFDdkJELGlCQUFXLENBQVg7QUFDRCxLQUZELE1BRU87QUFDTCxXQUFLLElBQUlJLElBQUksQ0FBYixFQUFnQkEsSUFBSUgsYUFBcEIsRUFBbUNHLElBQUksQ0FBdkMsRUFBMEM7QUFDeENKLG9CQUFZSixTQUFTQyxTQUFTSyxnQkFBVCxDQUEwQiw0QkFBMUIsRUFBd0RFLENBQXhELEV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