diff options
author | Vijay A <avijayr@protonmail.com> | 2021-07-31 15:28:23 +0530 |
---|---|---|
committer | Vijay A <avijayr@protonmail.com> | 2021-07-31 15:28:23 +0530 |
commit | 97697e3d069972844b2912a93022f4a4904a40d6 (patch) | |
tree | 53faff30fbac9d72042f593dfe1c547809f4f121 /recipes/basecamp/webview.js | |
parent | Allow any url in the custom-service to allow for sites like 'http://translate... (diff) | |
download | ferdium-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/basecamp/webview.js')
-rw-r--r-- | recipes/basecamp/webview.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/recipes/basecamp/webview.js b/recipes/basecamp/webview.js index 80cb8de..85f78ee 100644 --- a/recipes/basecamp/webview.js +++ b/recipes/basecamp/webview.js | |||
@@ -11,13 +11,13 @@ module.exports = (Franz, options) => { | |||
11 | callback(); | 11 | callback(); |
12 | } | 12 | } |
13 | }; | 13 | }; |
14 | function showModal (text) { | 14 | function showModal(text) { |
15 | show(modal); | 15 | show(modal); |
16 | modal.querySelector('p').innerHTML = text; | 16 | modal.querySelector('p').innerHTML = text; |
17 | updates += 1; | 17 | updates += 1; |
18 | } | 18 | } |
19 | 19 | ||
20 | function hideModal () { | 20 | function hideModal() { |
21 | hide(modal); | 21 | hide(modal); |
22 | modal.querySelector('p').innerHTML = ''; | 22 | modal.querySelector('p').innerHTML = ''; |
23 | updates -= 1; | 23 | updates -= 1; |
@@ -30,20 +30,20 @@ module.exports = (Franz, options) => { | |||
30 | showModal.apply(oldAlert, arguments); | 30 | showModal.apply(oldAlert, arguments); |
31 | }; | 31 | }; |
32 | 32 | ||
33 | function show (element) { | 33 | function show(element) { |
34 | element.style.display = 'inherit'; | 34 | element.style.display = 'inherit'; |
35 | } | 35 | } |
36 | 36 | ||
37 | function hide (element) { | 37 | function hide(element) { |
38 | element.style.display = 'none'; | 38 | element.style.display = 'none'; |
39 | } | 39 | } |
40 | 40 | ||
41 | const getMessages = () => { | 41 | const getMessages = () => { |
42 | // get unread messages | 42 | // get unread messages |
43 | //const updates = document.getElementById('franz').getAttribute('data-unread'); | 43 | // const updates = document.getElementById('franz').getAttribute('data-unread'); |
44 | 44 | ||
45 | // get conversations in 'My Inbox' | 45 | // get conversations in 'My Inbox' |
46 | //const inbox = document.getElementById('franz').getAttribute('data-inbox'); | 46 | // const inbox = document.getElementById('franz').getAttribute('data-inbox'); |
47 | 47 | ||
48 | // set Franz badge | 48 | // set Franz badge |
49 | // updates => passive unread count | 49 | // updates => passive unread count |
@@ -56,7 +56,7 @@ module.exports = (Franz, options) => { | |||
56 | modal.querySelector('.close').addEventListener('click', hideModal); | 56 | modal.querySelector('.close').addEventListener('click', hideModal); |
57 | waitFor(() => document.body, () => document.body.appendChild(modal)); | 57 | waitFor(() => document.body, () => document.body.appendChild(modal)); |
58 | 58 | ||
59 | document.addEventListener('keydown', function(e) { if (e.keyCode === 27) { hideModal(); } }) | 59 | document.addEventListener('keydown', (e) => { if (e.keyCode === 27) { hideModal(); } }); |
60 | 60 | ||
61 | // inject franz.css stylesheet | 61 | // inject franz.css stylesheet |
62 | Franz.injectCSS(path.join(__dirname, 'css', 'modal.css')); | 62 | Franz.injectCSS(path.join(__dirname, 'css', 'modal.css')); |