From ea2df89c564253ab6783fa133048b2c717e79481 Mon Sep 17 00:00:00 2001 From: Marco Reyes R Date: Wed, 11 Sep 2024 11:26:27 -0300 Subject: [PATCH 01/13] feat(yammer)!: rename to viva-engage --- recipes/{yammer => viva-engage}/LICENSE | 0 recipes/{yammer => viva-engage}/icon.svg | 0 recipes/{yammer => viva-engage}/index.js | 0 recipes/viva-engage/package.json | 10 +++++++ recipes/yammer/package.json | 10 ------- recipes/yammer/webview.js | 34 ------------------------ 6 files changed, 10 insertions(+), 44 deletions(-) rename recipes/{yammer => viva-engage}/LICENSE (100%) rename recipes/{yammer => viva-engage}/icon.svg (100%) rename recipes/{yammer => viva-engage}/index.js (100%) create mode 100644 recipes/viva-engage/package.json delete mode 100644 recipes/yammer/package.json delete mode 100644 recipes/yammer/webview.js 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/yammer/icon.svg b/recipes/viva-engage/icon.svg similarity index 100% rename from recipes/yammer/icon.svg rename to recipes/viva-engage/icon.svg 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..b4013b4ed --- /dev/null +++ b/recipes/viva-engage/package.json @@ -0,0 +1,10 @@ +{ + "id": "viva-engage", + "name": "Viva Engage", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://engage.cloud.microsoft", + "hasIndirectMessages": true + } +} 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 - } -} diff --git a/recipes/yammer/webview.js b/recipes/yammer/webview.js deleted file mode 100644 index 0ec0c6bd5..000000000 --- a/recipes/yammer/webview.js +++ /dev/null @@ -1,34 +0,0 @@ -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; -} - -const _path = _interopRequireDefault(require('path')); - -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', - ); - - if (notificationElement) { - directMessages = Ferdium.safeParseInt(notificationElement.textContent); - } - - if (newMessagesElement) { - indirectMessages = Ferdium.safeParseInt( - newMessagesElement.textContent.match(/\d+/)[0], - ); - } - - Ferdium.setBadge(directMessages, indirectMessages); - }; - - Ferdium.loop(getMessages); - - Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); -}; From 5747f4924a1f5bc156ffd360b79cad36057343e0 Mon Sep 17 00:00:00 2001 From: Marco Reyes R Date: Wed, 11 Sep 2024 11:34:23 -0300 Subject: [PATCH 02/13] fix(yammer): set new selectors for notifications and messagges --- recipes/viva-engage/webview.js | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 recipes/viva-engage/webview.js diff --git a/recipes/viva-engage/webview.js b/recipes/viva-engage/webview.js new file mode 100644 index 000000000..2191b4fc9 --- /dev/null +++ b/recipes/viva-engage/webview.js @@ -0,0 +1,34 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + +module.exports = Ferdium => { + const getMessages = () => { + let directMessages = 0; + let indirectMessages = 0; + 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); + } + + if (newMessagesElement) { + indirectMessages = Ferdium.safeParseInt( + newMessagesElement.textContent.match(/\d+/)[0], + ); + } + + Ferdium.setBadge(directMessages, indirectMessages); + }; + + Ferdium.loop(getMessages); + + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); +}; From 42c51d0c04b4140f6e99e7570f77a54927a60151 Mon Sep 17 00:00:00 2001 From: Marco Reyes R Date: Wed, 11 Sep 2024 11:36:36 -0300 Subject: [PATCH 03/13] chore(version): bump to 1.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8225d5bfa..242c63115 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ferdium-recipes", - "version": "1.0.1", + "version": "1.1.0", "directories": { "doc": "docs" }, From 233ef1bcc2b542378fd714b42a45fe6b674d6482 Mon Sep 17 00:00:00 2001 From: Marco Reyes R Date: Tue, 24 Sep 2024 16:23:12 -0300 Subject: [PATCH 04/13] fix(viva-engage): update icon svg --- recipes/viva-engage/icon.svg | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/recipes/viva-engage/icon.svg b/recipes/viva-engage/icon.svg index 22dff11c0..898180182 100644 --- a/recipes/viva-engage/icon.svg +++ b/recipes/viva-engage/icon.svg @@ -1 +1,13 @@ - \ No newline at end of file + + + + + + + \ No newline at end of file From 55806d710bd5c77830d377a8d3d14cb5287180a2 Mon Sep 17 00:00:00 2001 From: Marco Reyes R Date: Fri, 4 Oct 2024 10:44:28 -0300 Subject: [PATCH 05/13] Revert "chore(version): bump to 1.1.0" This reverts commit 42c51d0c04b4140f6e99e7570f77a54927a60151. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 242c63115..8225d5bfa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ferdium-recipes", - "version": "1.1.0", + "version": "1.0.1", "directories": { "doc": "docs" }, From 72287e94ab0040c1678ed3d44cff818653e925a1 Mon Sep 17 00:00:00 2001 From: Marco Reyes R Date: Fri, 4 Oct 2024 11:00:25 -0300 Subject: [PATCH 06/13] fix(viva-engage): add yammer as an alias --- recipes/viva-engage/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/viva-engage/package.json b/recipes/viva-engage/package.json index b4013b4ed..b81749d71 100644 --- a/recipes/viva-engage/package.json +++ b/recipes/viva-engage/package.json @@ -1,6 +1,7 @@ { "id": "viva-engage", "name": "Viva Engage", + "alias": "yammer", "version": "1.0.0", "license": "MIT", "config": { From 3b8ae2287182db536edf62ae875f2f74de4dd9a4 Mon Sep 17 00:00:00 2001 From: Marco Reyes R Date: Wed, 11 Sep 2024 11:26:27 -0300 Subject: [PATCH 07/13] feat(yammer)!: rename to viva-engage --- recipes/{yammer => viva-engage}/LICENSE | 0 recipes/{yammer => viva-engage}/icon.svg | 0 recipes/{yammer => viva-engage}/index.js | 0 recipes/viva-engage/package.json | 10 +++++++ recipes/yammer/package.json | 10 ------- recipes/yammer/webview.js | 34 ------------------------ 6 files changed, 10 insertions(+), 44 deletions(-) rename recipes/{yammer => viva-engage}/LICENSE (100%) rename recipes/{yammer => viva-engage}/icon.svg (100%) rename recipes/{yammer => viva-engage}/index.js (100%) create mode 100644 recipes/viva-engage/package.json delete mode 100644 recipes/yammer/package.json delete mode 100644 recipes/yammer/webview.js 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/yammer/icon.svg b/recipes/viva-engage/icon.svg similarity index 100% rename from recipes/yammer/icon.svg rename to recipes/viva-engage/icon.svg 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..b4013b4ed --- /dev/null +++ b/recipes/viva-engage/package.json @@ -0,0 +1,10 @@ +{ + "id": "viva-engage", + "name": "Viva Engage", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://engage.cloud.microsoft", + "hasIndirectMessages": true + } +} 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 - } -} diff --git a/recipes/yammer/webview.js b/recipes/yammer/webview.js deleted file mode 100644 index 0ec0c6bd5..000000000 --- a/recipes/yammer/webview.js +++ /dev/null @@ -1,34 +0,0 @@ -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; -} - -const _path = _interopRequireDefault(require('path')); - -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', - ); - - if (notificationElement) { - directMessages = Ferdium.safeParseInt(notificationElement.textContent); - } - - if (newMessagesElement) { - indirectMessages = Ferdium.safeParseInt( - newMessagesElement.textContent.match(/\d+/)[0], - ); - } - - Ferdium.setBadge(directMessages, indirectMessages); - }; - - Ferdium.loop(getMessages); - - Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); -}; From 3b66592b691df9f2678167b4bbc61b911c52d426 Mon Sep 17 00:00:00 2001 From: Marco Reyes R Date: Wed, 11 Sep 2024 11:34:23 -0300 Subject: [PATCH 08/13] fix(yammer): set new selectors for notifications and messagges --- recipes/viva-engage/webview.js | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 recipes/viva-engage/webview.js diff --git a/recipes/viva-engage/webview.js b/recipes/viva-engage/webview.js new file mode 100644 index 000000000..2191b4fc9 --- /dev/null +++ b/recipes/viva-engage/webview.js @@ -0,0 +1,34 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + +module.exports = Ferdium => { + const getMessages = () => { + let directMessages = 0; + let indirectMessages = 0; + 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); + } + + if (newMessagesElement) { + indirectMessages = Ferdium.safeParseInt( + newMessagesElement.textContent.match(/\d+/)[0], + ); + } + + Ferdium.setBadge(directMessages, indirectMessages); + }; + + Ferdium.loop(getMessages); + + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); +}; From f45fe6ff80595e5a2fb63f479006ed0a60d710bc Mon Sep 17 00:00:00 2001 From: Marco Reyes R Date: Wed, 11 Sep 2024 11:36:36 -0300 Subject: [PATCH 09/13] chore(version): bump to 1.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8225d5bfa..242c63115 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ferdium-recipes", - "version": "1.0.1", + "version": "1.1.0", "directories": { "doc": "docs" }, From e29fbd8e73c66b98d521e5391ed3b84d4302c60c Mon Sep 17 00:00:00 2001 From: Marco Reyes R Date: Tue, 24 Sep 2024 16:23:12 -0300 Subject: [PATCH 10/13] fix(viva-engage): update icon svg --- recipes/viva-engage/icon.svg | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/recipes/viva-engage/icon.svg b/recipes/viva-engage/icon.svg index 22dff11c0..898180182 100644 --- a/recipes/viva-engage/icon.svg +++ b/recipes/viva-engage/icon.svg @@ -1 +1,13 @@ - \ No newline at end of file + + + + + + + \ No newline at end of file From 8b8f17bf1e94d97eec4a9fcba2bf77cb8b7d221b Mon Sep 17 00:00:00 2001 From: Marco Reyes R Date: Fri, 4 Oct 2024 10:44:28 -0300 Subject: [PATCH 11/13] Revert "chore(version): bump to 1.1.0" This reverts commit 42c51d0c04b4140f6e99e7570f77a54927a60151. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 242c63115..8225d5bfa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ferdium-recipes", - "version": "1.1.0", + "version": "1.0.1", "directories": { "doc": "docs" }, From 7a4d3817677efdbd70dc2f9beca7824fc9c6a6fe Mon Sep 17 00:00:00 2001 From: Marco Reyes R Date: Fri, 4 Oct 2024 11:00:25 -0300 Subject: [PATCH 12/13] fix(viva-engage): add yammer as an alias --- recipes/viva-engage/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/viva-engage/package.json b/recipes/viva-engage/package.json index b4013b4ed..b81749d71 100644 --- a/recipes/viva-engage/package.json +++ b/recipes/viva-engage/package.json @@ -1,6 +1,7 @@ { "id": "viva-engage", "name": "Viva Engage", + "alias": "yammer", "version": "1.0.0", "license": "MIT", "config": { From 91849801a0238ec70c3c76a0d6d7b8b19cf0e9bd Mon Sep 17 00:00:00 2001 From: Marco Reyes R Date: Fri, 4 Oct 2024 15:32:33 -0300 Subject: [PATCH 13/13] fix(viva-engage): use correct key for alias --- recipes/viva-engage/package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/viva-engage/package.json b/recipes/viva-engage/package.json index b81749d71..0aa848681 100644 --- a/recipes/viva-engage/package.json +++ b/recipes/viva-engage/package.json @@ -1,9 +1,11 @@ { "id": "viva-engage", "name": "Viva Engage", - "alias": "yammer", "version": "1.0.0", "license": "MIT", + "aliases": [ + "yammer" + ], "config": { "serviceURL": "https://engage.cloud.microsoft", "hasIndirectMessages": true