diff options
Diffstat (limited to 'recipes/erepublik/webview.js')
-rw-r--r-- | recipes/erepublik/webview.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/recipes/erepublik/webview.js b/recipes/erepublik/webview.js index a47c57d..2f5bc9f 100644 --- a/recipes/erepublik/webview.js +++ b/recipes/erepublik/webview.js | |||
@@ -2,7 +2,7 @@ const _path = _interopRequireDefault(require('path')); | |||
2 | 2 | ||
3 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | 3 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
4 | 4 | ||
5 | module.exports = Ferdi => { | 5 | module.exports = Ferdium => { |
6 | const getMessages = () => { | 6 | const getMessages = () => { |
7 | const elementNotify = document.querySelectorAll('.notify'); | 7 | const elementNotify = document.querySelectorAll('.notify'); |
8 | const elementFeed = document.querySelectorAll('.unreadCounter.ng-binding.ng-scope'); | 8 | const elementFeed = document.querySelectorAll('.unreadCounter.ng-binding.ng-scope'); |
@@ -12,18 +12,18 @@ module.exports = Ferdi => { | |||
12 | 12 | ||
13 | for (const element of elementNotify) { | 13 | for (const element of elementNotify) { |
14 | const splitText = element.title.split(':'); | 14 | const splitText = element.title.split(':'); |
15 | countNotify += Ferdi.safeParseInt(splitText[1]); | 15 | countNotify += Ferdium.safeParseInt(splitText[1]); |
16 | } | 16 | } |
17 | 17 | ||
18 | for (const element of elementFeed) { | 18 | for (const element of elementFeed) { |
19 | countFeed += Ferdi.safeParseInt(element.textContent); | 19 | countFeed += Ferdium.safeParseInt(element.textContent); |
20 | } | 20 | } |
21 | 21 | ||
22 | Ferdi.setBadge(countNotify, countFeed); | 22 | Ferdium.setBadge(countNotify, countFeed); |
23 | }; | 23 | }; |
24 | 24 | ||
25 | Ferdi.loop(getMessages); | 25 | Ferdium.loop(getMessages); |
26 | 26 | ||
27 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); | 27 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); |
28 | Ferdi.injectCSS(_path.default.join(__dirname, 'crpk-resources/fonts.css')); | 28 | Ferdium.injectCSS(_path.default.join(__dirname, 'crpk-resources/fonts.css')); |
29 | }; | 29 | }; |