aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/googlecalendar
diff options
context:
space:
mode:
authorLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-08-27 18:13:24 +0530
committerLibravatar GitHub <noreply@github.com>2021-08-27 18:13:24 +0530
commit155c4b832281348c16be1f4ef667e6e23dbf1bd8 (patch)
treed144e2de2e6c7fb2e334246e8a4aecdbeb08ef8d /recipes/googlecalendar
parentdocs: fixed template file for creating recipe. (diff)
downloadferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.tar.gz
ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.tar.zst
ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.zip
chore: normalized all recipes to ensure compatibility with es6 (#639)
- Removed some calls to set badge with '0' all the time. - Removed all 'sourceMaps' since they are all outdated atm.
Diffstat (limited to 'recipes/googlecalendar')
-rw-r--r--recipes/googlecalendar/index.js2
-rw-r--r--recipes/googlecalendar/package.json2
-rw-r--r--recipes/googlecalendar/webview-unsafe.js14
-rw-r--r--recipes/googlecalendar/webview.js10
4 files changed, 15 insertions, 13 deletions
diff --git a/recipes/googlecalendar/index.js b/recipes/googlecalendar/index.js
index f18361f..553d5ef 100644
--- a/recipes/googlecalendar/index.js
+++ b/recipes/googlecalendar/index.js
@@ -1,2 +1,2 @@
1module.exports = Franz => class GoogleCalendar extends Franz { 1module.exports = Ferdi => class GoogleCalendar extends Ferdi {
2}; 2};
diff --git a/recipes/googlecalendar/package.json b/recipes/googlecalendar/package.json
index 6d097bb..58f78ed 100644
--- a/recipes/googlecalendar/package.json
+++ b/recipes/googlecalendar/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "googlecalendar", 2 "id": "googlecalendar",
3 "name": "Google Calendar", 3 "name": "Google Calendar",
4 "version": "2.1.1", 4 "version": "2.2.0",
5 "license": "MIT", 5 "license": "MIT",
6 "aliases": [ 6 "aliases": [
7 "google-calendar", 7 "google-calendar",
diff --git a/recipes/googlecalendar/webview-unsafe.js b/recipes/googlecalendar/webview-unsafe.js
index 68145ad..c47f572 100644
--- a/recipes/googlecalendar/webview-unsafe.js
+++ b/recipes/googlecalendar/webview-unsafe.js
@@ -12,24 +12,24 @@ const waitFor = (condition, callback) => {
12const showModal = text => { 12const showModal = text => {
13 modal.querySelector('p').innerHTML = text; 13 modal.querySelector('p').innerHTML = text;
14 updates += 1; 14 updates += 1;
15 window.franz.setBadge(updates); 15 window.ferdi.setBadge(updates);
16 modal.classList.add('open'); 16 modal.classList.add('open');
17}; 17};
18 18
19const hideModal = () => { 19const hideModal = () => {
20 modal.querySelector('p').innerHTML = ''; 20 modal.querySelector('p').innerHTML = '';
21 updates -= 1; 21 updates -= 1;
22 window.franz.setBadge(updates); 22 window.ferdi.setBadge(updates);
23 modal.classList.remove('open'); 23 modal.classList.remove('open');
24}; 24};
25 25
26const createModal = () => { 26const createModal = () => {
27 const franzModal = document.createElement('div'); 27 const modalDialog = document.createElement('div');
28 franzModal.setAttribute('id', 'franz-modal'); 28 modalDialog.setAttribute('id', 'franz-modal');
29 franzModal.innerHTML = '<div class="modal-content"><span class="close">&times;</span><p></p></div>'; 29 modalDialog.innerHTML = '<div class="modal-content"><span class="close">&times;</span><p></p></div>';
30 franzModal.querySelector('.close').addEventListener('click', hideModal); 30 modalDialog.querySelector('.close').addEventListener('click', hideModal);
31 31
32 return franzModal; 32 return modalDialog;
33}; 33};
34 34
35window.alert = showModal; 35window.alert = showModal;
diff --git a/recipes/googlecalendar/webview.js b/recipes/googlecalendar/webview.js
index 2e34c8b..7a55b0a 100644
--- a/recipes/googlecalendar/webview.js
+++ b/recipes/googlecalendar/webview.js
@@ -1,6 +1,8 @@
1const path = require('path'); 1const _path = _interopRequireDefault(require('path'));
2 2
3module.exports = Franz => { 3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4 Franz.injectCSS(path.join(__dirname, 'calendar.css')); 4
5 Franz.injectJSUnsafe(path.join(__dirname, 'webview-unsafe.js')); 5module.exports = Ferdi => {
6 Ferdi.injectCSS(_path.default.join(__dirname, 'calendar.css'));
7 Ferdi.injectJSUnsafe(_path.default.join(__dirname, 'webview-unsafe.js'));
6}; 8};