aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/telegram
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/telegram
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/telegram')
-rw-r--r--recipes/telegram/index.js4
-rw-r--r--recipes/telegram/webview.js15
2 files changed, 7 insertions, 12 deletions
diff --git a/recipes/telegram/index.js b/recipes/telegram/index.js
index 6343150..ac3e6f0 100644
--- a/recipes/telegram/index.js
+++ b/recipes/telegram/index.js
@@ -1,4 +1,2 @@
1"use strict";
2
3module.exports = Franz => Franz; 1module.exports = Franz => Franz;
4//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlbGVncmFtL2luZGV4LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJGcmFueiJdLCJtYXBwaW5ncyI6Ijs7QUFBQUEsT0FBT0MsT0FBUCxHQUFpQkMsU0FBU0EsS0FBMUIiLCJmaWxlIjoidGVsZWdyYW0vaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IEZyYW56ID0+IEZyYW56O1xuIl19 \ No newline at end of file 2// # sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlbGVncmFtL2luZGV4LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJGcmFueiJdLCJtYXBwaW5ncyI6Ijs7QUFBQUEsT0FBT0MsT0FBUCxHQUFpQkMsU0FBU0EsS0FBMUIiLCJmaWxlIjoidGVsZWdyYW0vaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IEZyYW56ID0+IEZyYW56O1xuIl19
diff --git a/recipes/telegram/webview.js b/recipes/telegram/webview.js
index a8c2ddd..8da63d1 100644
--- a/recipes/telegram/webview.js
+++ b/recipes/telegram/webview.js
@@ -1,21 +1,18 @@
1// Code copied from: https://gitlab.com/gortega4/ferdi_recipes 1// Code copied from: https://gitlab.com/gortega4/ferdi_recipes
2 2
3'use strict';
4
5const path = require('path'); 3const path = require('path');
6 4
7module.exports = Franz => { 5module.exports = Franz => {
8 const getMessages = function getMessages() { 6 const getMessages = function getMessages() {
9 let count = 0; 7 let count = 0;
10 let count_sec = 0 8 let count_sec = 0;
11 const elements = document.querySelectorAll('.rp'); 9 const elements = document.querySelectorAll('.rp');
12 for (let i = 0; i < elements.length; i += 1) { 10 for (let i = 0; i < elements.length; i += 1) {
13 if (elements[i].querySelector('.dialog-subtitle-badge') && (!isNaN(parseInt(elements[i].querySelector('.dialog-subtitle-badge').innerText)) )) { 11 if (elements[i].querySelector('.dialog-subtitle-badge') && (!isNaN(parseInt(elements[i].querySelector('.dialog-subtitle-badge').innerText)))) {
14 if (parseInt(elements[i].querySelector('.dialog-subtitle-badge').innerText) != "" && (elements[i].dataset.peerId > 0)) { 12 if (parseInt(elements[i].querySelector('.dialog-subtitle-badge').innerText) != '' && (elements[i].dataset.peerId > 0)) {
15 count = +count + parseInt(elements[i].querySelector('.dialog-subtitle-badge').innerText) 13 count = +count + parseInt(elements[i].querySelector('.dialog-subtitle-badge').innerText);
16 } 14 } else {
17 else { 15 count_sec = +count_sec + parseInt(elements[i].querySelector('.dialog-subtitle-badge').innerText);
18 count_sec = +count_sec + parseInt(elements[i].querySelector('.dialog-subtitle-badge').innerText)
19 } 16 }
20 } 17 }
21 } 18 }