aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/msteams
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2021-09-19 00:41:52 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2021-09-19 00:57:47 +0200
commitc5d2a889d4cb44f995d74051f83628b505383093 (patch)
treeb1bab2b6d7f99ab00b0ca9860079f71472ac79ae /recipes/msteams
parentFix images opening in browser instead of in Discord (#712) (diff)
downloadferdium-recipes-c5d2a889d4cb44f995d74051f83628b505383093.tar.gz
ferdium-recipes-c5d2a889d4cb44f995d74051f83628b505383093.tar.zst
ferdium-recipes-c5d2a889d4cb44f995d74051f83628b505383093.zip
fix: privileged API access
Privileged browser APIs should be accessed from webview.js via the Ferdi parameter to the exported function. If any service is broken (e.g., screen sharing), then most likely we have to fix recipe.js or screenshare.js
Diffstat (limited to 'recipes/msteams')
-rw-r--r--recipes/msteams/package.json2
-rw-r--r--recipes/msteams/webview.js10
2 files changed, 6 insertions, 6 deletions
diff --git a/recipes/msteams/package.json b/recipes/msteams/package.json
index 10fb69b..17c0aa0 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.4", 4 "version": "3.1.5",
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 786cd9b..94f3ae8 100644
--- a/recipes/msteams/webview.js
+++ b/recipes/msteams/webview.js
@@ -2,11 +2,6 @@ const _path = _interopRequireDefault(require('path'));
2 2
3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4 4
5window.addEventListener('beforeunload', async () => {
6 Ferdi.clearStorageData(['appcache', 'serviceworkers', 'cachestorage', 'websql', 'indexdb']);
7 Ferdi.releaseServiceWorkers();
8});
9
10module.exports = Ferdi => { 5module.exports = Ferdi => {
11 const getMessages = () => { 6 const getMessages = () => {
12 let messages = 0; 7 let messages = 0;
@@ -20,6 +15,11 @@ module.exports = Ferdi => {
20 Ferdi.setBadge(messages, indirectMessages); 15 Ferdi.setBadge(messages, indirectMessages);
21 }; 16 };
22 17
18 window.addEventListener('beforeunload', async () => {
19 Ferdi.clearStorageData(['appcache', 'serviceworkers', 'cachestorage', 'websql', 'indexdb']);
20 Ferdi.releaseServiceWorkers();
21 });
22
23 Ferdi.loop(getMessages); 23 Ferdi.loop(getMessages);
24 24
25 Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); 25 Ferdi.injectCSS(_path.default.join(__dirname, 'service.css'));