aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/nextcloud-talk
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2021-07-31 15:28:23 +0530
committerLibravatar Vijay A <avijayr@protonmail.com>2021-07-31 15:28:23 +0530
commit97697e3d069972844b2912a93022f4a4904a40d6 (patch)
tree53faff30fbac9d72042f593dfe1c547809f4f121 /recipes/nextcloud-talk
parentAllow any url in the custom-service to allow for sites like 'http://translate... (diff)
downloadferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.tar.gz
ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.tar.zst
ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.zip
Fixed eslintrc as root for this folder; Reformatted all files.
Diffstat (limited to 'recipes/nextcloud-talk')
-rw-r--r--recipes/nextcloud-talk/index.js2
-rw-r--r--recipes/nextcloud-talk/webview.js12
2 files changed, 5 insertions, 9 deletions
diff --git a/recipes/nextcloud-talk/index.js b/recipes/nextcloud-talk/index.js
index 3fa8c04..ad8f01f 100644
--- a/recipes/nextcloud-talk/index.js
+++ b/recipes/nextcloud-talk/index.js
@@ -1,5 +1,3 @@
1"use strict";
2
3module.exports = Franz => class Nextcloud extends Franz { 1module.exports = Franz => class Nextcloud extends Franz {
4 buildUrl(url) { 2 buildUrl(url) {
5 return `${url}/apps/spreed/`; 3 return `${url}/apps/spreed/`;
diff --git a/recipes/nextcloud-talk/webview.js b/recipes/nextcloud-talk/webview.js
index 0dfb6ea..12c2230 100644
--- a/recipes/nextcloud-talk/webview.js
+++ b/recipes/nextcloud-talk/webview.js
@@ -1,6 +1,4 @@
1"use strict"; 1const _path = _interopRequireDefault(require('path'));
2
3var _path = _interopRequireDefault(require("path"));
4 2
5function _interopRequireDefault(obj) { 3function _interopRequireDefault(obj) {
6 return obj && obj.__esModule ? obj : { default: obj }; 4 return obj && obj.__esModule ? obj : { default: obj };
@@ -10,21 +8,21 @@ module.exports = Ferdi => {
10 const getMessages = function getMessages() { 8 const getMessages = function getMessages() {
11 let direct = 0; 9 let direct = 0;
12 const notificationWrapper = document.querySelector( 10 const notificationWrapper = document.querySelector(
13 '.notifications .notification-wrapper' 11 '.notifications .notification-wrapper',
14 ); 12 );
15 13
16 if (notificationWrapper) { 14 if (notificationWrapper) {
17 direct = notificationWrapper.querySelectorAll( 15 direct = notificationWrapper.querySelectorAll(
18 '.notification[object_type="chat"], .notification[object_type="room"' 16 '.notification[object_type="chat"], .notification[object_type="room"',
19 ).length; 17 ).length;
20 } 18 }
21 19
22 let indirect = 0; 20 let indirect = 0;
23 21
24 document.querySelectorAll('.app-navigation-entry__counter').forEach( 22 document.querySelectorAll('.app-navigation-entry__counter').forEach(
25 function(counter) { 23 (counter) => {
26 indirect += Number(counter.textContent); 24 indirect += Number(counter.textContent);
27 } 25 },
28 ); 26 );
29 Ferdi.setBadge(direct, indirect); 27 Ferdi.setBadge(direct, indirect);
30 }; 28 };