aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/workplace/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/workplace/webview.js')
-rw-r--r--recipes/workplace/webview.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/recipes/workplace/webview.js b/recipes/workplace/webview.js
index 90c6c27..8ee283b 100644
--- a/recipes/workplace/webview.js
+++ b/recipes/workplace/webview.js
@@ -4,7 +4,7 @@ function _interopRequireDefault(obj) {
4 return obj && obj.__esModule ? obj : { default: obj }; 4 return obj && obj.__esModule ? obj : { default: obj };
5} 5}
6 6
7module.exports = Ferdi => { 7module.exports = Ferdium => {
8 const getMessages = () => { 8 const getMessages = () => {
9 let direct = 0; 9 let direct = 0;
10 let indirect = 0; 10 let indirect = 0;
@@ -12,7 +12,7 @@ module.exports = Ferdi => {
12 const notifications = document.querySelector('#notifications span span'); 12 const notifications = document.querySelector('#notifications span span');
13 13
14 if (notifications) { 14 if (notifications) {
15 indirect = Ferdi.safeParseInt(notifications.textContent); 15 indirect = Ferdium.safeParseInt(notifications.textContent);
16 } 16 }
17 17
18 if (chatsElement) { 18 if (chatsElement) {
@@ -20,7 +20,7 @@ module.exports = Ferdi => {
20 const chatMessages = chatsElement.querySelector('span'); 20 const chatMessages = chatsElement.querySelector('span');
21 21
22 if (chatMessages) { 22 if (chatMessages) {
23 direct = Ferdi.safeParseInt(chatMessages.textContent); 23 direct = Ferdium.safeParseInt(chatMessages.textContent);
24 } 24 }
25 } else { 25 } else {
26 direct = document.querySelectorAll( 26 direct = document.querySelectorAll(
@@ -29,20 +29,20 @@ module.exports = Ferdi => {
29 } 29 }
30 } 30 }
31 31
32 Ferdi.setBadge(direct, indirect); 32 Ferdium.setBadge(direct, indirect);
33 }; 33 };
34 34
35 Ferdi.loop(getMessages); 35 Ferdium.loop(getMessages);
36 36
37 Ferdi.injectCSS(_path.default.join(__dirname, 'workplace.css')); 37 Ferdium.injectCSS(_path.default.join(__dirname, 'workplace.css'));
38 38
39 localStorage._cs_desktopNotifsEnabled = JSON.stringify({ 39 localStorage._cs_desktopNotifsEnabled = JSON.stringify({
40 __t: Date.now(), 40 __t: Date.now(),
41 __v: true, 41 __v: true,
42 }); 42 });
43 43
44 if (typeof Ferdi.onNotify === 'function') { 44 if (typeof Ferdium.onNotify === 'function') {
45 Ferdi.onNotify(notification => { 45 Ferdium.onNotify(notification => {
46 if (typeof notification.title !== 'string') { 46 if (typeof notification.title !== 'string') {
47 notification.title = 47 notification.title =
48 ((notification.title.props || {}).content || [])[0] || 'Work Chat'; 48 ((notification.title.props || {}).content || [])[0] || 'Work Chat';