diff options
Diffstat (limited to 'recipes')
-rw-r--r-- | recipes/notion-calendar/package.json | 2 | ||||
-rw-r--r-- | recipes/notion-calendar/webview-unsafe.js | 7 | ||||
-rw-r--r-- | recipes/notion-calendar/webview.js | 8 |
3 files changed, 9 insertions, 8 deletions
diff --git a/recipes/notion-calendar/package.json b/recipes/notion-calendar/package.json index 672c823..1f41789 100644 --- a/recipes/notion-calendar/package.json +++ b/recipes/notion-calendar/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "notion-calendar", | 2 | "id": "notion-calendar", |
3 | "name": "Notion Calendar", | 3 | "name": "Notion Calendar", |
4 | "version": "1.0.0", | 4 | "version": "1.0.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://calendar.notion.so/", | 7 | "serviceURL": "https://calendar.notion.so/", |
diff --git a/recipes/notion-calendar/webview-unsafe.js b/recipes/notion-calendar/webview-unsafe.js new file mode 100644 index 0000000..f028f4c --- /dev/null +++ b/recipes/notion-calendar/webview-unsafe.js | |||
@@ -0,0 +1,7 @@ | |||
1 | // Workaround for Notion's login window with Google OAuth | ||
2 | if (window.location.href === 'https://calendar.notion.so/login') { | ||
3 | window.open = function (url) { | ||
4 | const newUrl = url.replace('popup=true', 'popup=false'); | ||
5 | window.location.href = newUrl; | ||
6 | }; | ||
7 | } | ||
diff --git a/recipes/notion-calendar/webview.js b/recipes/notion-calendar/webview.js index 2a81dec..c27c226 100644 --- a/recipes/notion-calendar/webview.js +++ b/recipes/notion-calendar/webview.js | |||
@@ -5,12 +5,6 @@ function _interopRequireDefault(obj) { | |||
5 | const _path = _interopRequireDefault(require('path')); | 5 | const _path = _interopRequireDefault(require('path')); |
6 | 6 | ||
7 | module.exports = Ferdium => { | 7 | module.exports = Ferdium => { |
8 | // TODO: If your SNAME service has unread messages, uncomment these lines to implement the logic for updating the badges | ||
9 | // const getMessages = () => { | ||
10 | // // TODO: Insert your notification-finding code here | ||
11 | // Ferdium.setBadge(0, 0); | ||
12 | // }; | ||
13 | // Ferdium.loop(getMessages); | ||
14 | |||
15 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); | 8 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); |
9 | Ferdium.injectJSUnsafe(_path.default.join(__dirname, 'webview-unsafe.js')); | ||
16 | }; | 10 | }; |