aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/msteams
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/msteams')
-rw-r--r--recipes/msteams/index.js4
-rw-r--r--recipes/msteams/package.json2
-rw-r--r--recipes/msteams/webview.js14
3 files changed, 10 insertions, 10 deletions
diff --git a/recipes/msteams/index.js b/recipes/msteams/index.js
index 941db72..c8cdc38 100644
--- a/recipes/msteams/index.js
+++ b/recipes/msteams/index.js
@@ -1,6 +1,6 @@
1module.exports = Ferdi => class MicrosoftTeams extends Ferdi { 1module.exports = Ferdium => class MicrosoftTeams extends Ferdium {
2 overrideUserAgent() { 2 overrideUserAgent() {
3 return window.navigator.userAgent.replace(/(Ferdi|Electron)\/\S+ \([^)]+\)/g, '').trim(); 3 return window.navigator.userAgent.replace(/(Ferdium|Electron)\/\S+ \([^)]+\)/g, '').trim();
4 } 4 }
5 5
6 // TODO: Commenting out since this can expose the user to a MITM attack. Before this can be turned on, we will need to put in some safeguards/warnings that the user can explicitly accept the security ramifications 6 // TODO: Commenting out since this can expose the user to a MITM attack. Before this can be turned on, we will need to put in some safeguards/warnings that the user can explicitly accept the security ramifications
diff --git a/recipes/msteams/package.json b/recipes/msteams/package.json
index 728a843..abefdd0 100644
--- a/recipes/msteams/package.json
+++ b/recipes/msteams/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "msteams", 2 "id": "msteams",
3 "name": "Microsoft Teams", 3 "name": "Microsoft Teams",
4 "version": "3.1.6", 4 "version": "3.2.0",
5 "license": "MIT", 5 "license": "MIT",
6 "aliases": [ 6 "aliases": [
7 "teamsChat" 7 "teamsChat"
diff --git a/recipes/msteams/webview.js b/recipes/msteams/webview.js
index 1dc5aee..c5e32e9 100644
--- a/recipes/msteams/webview.js
+++ b/recipes/msteams/webview.js
@@ -4,29 +4,29 @@ 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 messages = 0; 9 let messages = 0;
10 const badge = document.querySelector( 10 const badge = document.querySelector(
11 '.activity-badge.dot-activity-badge .activity-badge', 11 '.activity-badge.dot-activity-badge .activity-badge',
12 ); 12 );
13 if (badge) { 13 if (badge) {
14 messages = Ferdi.safeParseInt(badge.textContent); 14 messages = Ferdium.safeParseInt(badge.textContent);
15 } 15 }
16 16
17 const indirectMessages = document.querySelectorAll( 17 const indirectMessages = document.querySelectorAll(
18 '[class*=channel-anchor][class*=ts-unread-channel]', 18 '[class*=channel-anchor][class*=ts-unread-channel]',
19 ).length; 19 ).length;
20 20
21 Ferdi.setBadge(messages, indirectMessages); 21 Ferdium.setBadge(messages, indirectMessages);
22 }; 22 };
23 23
24 window.addEventListener('beforeunload', async () => { 24 window.addEventListener('beforeunload', async () => {
25 Ferdi.releaseServiceWorkers(); 25 Ferdium.releaseServiceWorkers();
26 }); 26 });
27 27
28 Ferdi.loop(getMessages); 28 Ferdium.loop(getMessages);
29 29
30 Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); 30 Ferdium.injectCSS(_path.default.join(__dirname, 'service.css'));
31 Ferdi.injectJSUnsafe(_path.default.join(__dirname, 'webview-unsafe.js')); 31 Ferdium.injectJSUnsafe(_path.default.join(__dirname, 'webview-unsafe.js'));
32}; 32};