diff options
author | 2020-09-22 20:56:48 +0200 | |
---|---|---|
committer | 2020-09-22 19:56:48 +0100 | |
commit | 6f5e4a00588aefdda7a5a1cfe70935870e7e234a (patch) | |
tree | 9e29aa7aa0620a1a4a968ff8739b4b8ba96791a9 /uncompressed/googlecalendar/webview.js | |
parent | Updated logos for Outlook/OWA (diff) | |
download | ferdium-recipes-6f5e4a00588aefdda7a5a1cfe70935870e7e234a.tar.gz ferdium-recipes-6f5e4a00588aefdda7a5a1cfe70935870e7e234a.tar.zst ferdium-recipes-6f5e4a00588aefdda7a5a1cfe70935870e7e234a.zip |
Unpack recipes and update recipes icons (#292)
Co-authored-by: Amine Mouafik <amine@mouafik.fr>
Diffstat (limited to 'uncompressed/googlecalendar/webview.js')
-rw-r--r-- | uncompressed/googlecalendar/webview.js | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/uncompressed/googlecalendar/webview.js b/uncompressed/googlecalendar/webview.js deleted file mode 100644 index 3d2b6f6..0000000 --- a/uncompressed/googlecalendar/webview.js +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | 'use strict'; | ||
2 | |||
3 | const path = require('path'); | ||
4 | |||
5 | module.exports = Franz => { | ||
6 | let modal; | ||
7 | let updates = 0; | ||
8 | |||
9 | const createModal = () => { | ||
10 | const franzModal = document.createElement('div'); | ||
11 | franzModal.setAttribute('id', 'franz-modal'); | ||
12 | franzModal.innerHTML = '<div class="modal-content"><span class="close">×</span><p></p></div>'; | ||
13 | franzModal.querySelector('.close').addEventListener('click', hideModal); | ||
14 | |||
15 | return franzModal; | ||
16 | }; | ||
17 | |||
18 | const showModal = text => { | ||
19 | modal.querySelector('p').innerHTML = text; | ||
20 | updates++; | ||
21 | modal.classList.add('open'); | ||
22 | }; | ||
23 | |||
24 | const hideModal = () => { | ||
25 | modal.querySelector('p').innerHTML = ''; | ||
26 | updates--; | ||
27 | modal.classList.remove('open'); | ||
28 | }; | ||
29 | |||
30 | window.alert = showModal; | ||
31 | |||
32 | const getMessages = () => Franz.setBadge(updates); | ||
33 | |||
34 | modal = createModal(); | ||
35 | document.body.appendChild(modal); | ||
36 | document.addEventListener('keydown', event => event.keyCode === 27 && hideModal()); | ||
37 | |||
38 | Franz.injectCSS(path.join(__dirname, 'calendar.css')); | ||
39 | Franz.loop(getMessages); | ||
40 | }; | ||
41 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImdvb2dsZWNhbGVuZGFyL3dlYnZpZXcuanMiXSwibmFtZXMiOlsicGF0aCIsInJlcXVpcmUiLCJtb2R1bGUiLCJleHBvcnRzIiwiRnJhbnoiLCJtb2RhbCIsInVwZGF0ZXMiLCJjcmVhdGVNb2RhbCIsImZyYW56TW9kYWwiLCJkb2N1bWVudCIsImNyZWF0ZUVsZW1lbnQiLCJzZXRBdHRyaWJ1dGUiLCJpbm5lckhUTUwiLCJxdWVyeVNlbGVjdG9yIiwiYWRkRXZlbnRMaXN0ZW5lciIsImhpZGVNb2RhbCIsInNob3dNb2RhbCIsInRleHQiLCJjbGFzc0xpc3QiLCJhZGQiLCJyZW1vdmUiLCJ3aW5kb3ciLCJhbGVydCIsImdldE1lc3NhZ2VzIiwic2V0QmFkZ2UiLCJib2R5IiwiYXBwZW5kQ2hpbGQiLCJldmVudCIsImtleUNvZGUiLCJpbmplY3RDU1MiLCJqb2luIiwiX19kaXJuYW1lIiwibG9vcCJdLCJtYXBwaW5ncyI6Ijs7QUFBQSxNQUFNQSxPQUFPQyxRQUFRLE1BQVIsQ0FBYjs7QUFFQUMsT0FBT0MsT0FBUCxHQUFpQkMsU0FBUztBQUN4QixNQUFJQyxLQUFKO0FBQ0EsTUFBSUMsVUFBVSxDQUFkOztBQUVBLFFBQU1DLGNBQWMsTUFBTTtBQUN4QixVQUFNQyxhQUFhQyxTQUFTQyxhQUFULENBQXVCLEtBQXZCLENBQW5CO0FBQ0FGLGVBQVdHLFlBQVgsQ0FBd0IsSUFBeEIsRUFBOEIsY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