diff --git a/recipes/yammer/LICENSE b/recipes/viva-engage/LICENSE similarity index 100% rename from recipes/yammer/LICENSE rename to recipes/viva-engage/LICENSE diff --git a/recipes/viva-engage/icon.svg b/recipes/viva-engage/icon.svg new file mode 100644 index 000000000..898180182 --- /dev/null +++ b/recipes/viva-engage/icon.svg @@ -0,0 +1,13 @@ + + + + + + + \ No newline at end of file diff --git a/recipes/yammer/index.js b/recipes/viva-engage/index.js similarity index 100% rename from recipes/yammer/index.js rename to recipes/viva-engage/index.js diff --git a/recipes/viva-engage/package.json b/recipes/viva-engage/package.json new file mode 100644 index 000000000..0aa848681 --- /dev/null +++ b/recipes/viva-engage/package.json @@ -0,0 +1,13 @@ +{ + "id": "viva-engage", + "name": "Viva Engage", + "version": "1.0.0", + "license": "MIT", + "aliases": [ + "yammer" + ], + "config": { + "serviceURL": "https://engage.cloud.microsoft", + "hasIndirectMessages": true + } +} diff --git a/recipes/yammer/webview.js b/recipes/viva-engage/webview.js similarity index 72% rename from recipes/yammer/webview.js rename to recipes/viva-engage/webview.js index 0ec0c6bd5..2191b4fc9 100644 --- a/recipes/yammer/webview.js +++ b/recipes/viva-engage/webview.js @@ -8,12 +8,12 @@ module.exports = Ferdium => { const getMessages = () => { let directMessages = 0; let indirectMessages = 0; - const notificationElement = document.querySelector( - '.yj-notifications-indicator-count', - ); - const newMessagesElement = document.querySelector( - '.yj-thread-list--new-messages-notice:not(.is-hidden) .yj-thread-list--new-message-text', - ); + const notificationElement = document.querySelectorAll( + 'div.badge-136 div.fui-CounterBadge', + )[1]; + const newMessagesElement = document.querySelectorAll( + 'div.badge-136 div.fui-CounterBadge', + )[0]; if (notificationElement) { directMessages = Ferdium.safeParseInt(notificationElement.textContent); diff --git a/recipes/yammer/icon.svg b/recipes/yammer/icon.svg deleted file mode 100644 index 22dff11c0..000000000 --- a/recipes/yammer/icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/recipes/yammer/package.json b/recipes/yammer/package.json deleted file mode 100644 index c242a4db0..000000000 --- a/recipes/yammer/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id": "yammer", - "name": "Yammer", - "version": "1.3.1", - "license": "MIT", - "config": { - "serviceURL": "https://www.yammer.com/login", - "hasIndirectMessages": true - } -}