From 006950318f1228af10eeb0cdfb0861af6ecb1e75 Mon Sep 17 00:00:00 2001 From: André Oliveira <37463445+SpecialAro@users.noreply.github.com> Date: Mon, 18 Mar 2024 12:36:05 +0000 Subject: Add several recipes (#519) The added recipes are as follows: - Mastodeck (fixes https://github.com/ferdium/ferdium-app/issues/959) - Microsoft Planner (fixes https://github.com/ferdium/ferdium-app/issues/955) - Alibaba Chat (fixes https://github.com/ferdium/ferdium-app/issues/1376) - Fiverr (step forward in https://github.com/ferdium/ferdium-app/issues/1377 - missing unread logic) - Draw.io (fixes https://github.com/ferdium/ferdium-app/issues/1429) - Canva (fixes https://github.com/ferdium/ferdium-app/issues/1447) - Penpot (fixes https://github.com/ferdium/ferdium-app/issues/1469) - HackerNews (fixes https://github.com/ferdium/ferdium-app/issues/1505) - Google Maps (fixes https://github.com/ferdium/ferdium-app/issues/1513) - Patreon (fixes https://github.com/ferdium/ferdium-app/issues/1524) - Fandom (fixes https://github.com/ferdium/ferdium-app/issues/1540) - Romeo (fixes https://github.com/ferdium/ferdium-app/issues/1553) - Infomaniak Kdrive (fixes https://github.com/ferdium/ferdium-app/issues/1559) - Notion Calendar (fixes https://github.com/ferdium/ferdium-app/issues/1599) - Superlist (fixes https://github.com/ferdium/ferdium-app/issues/1601) - Purelymail (fixes https://github.com/ferdium/ferdium-app/issues/1624) - SOGo (fixes https://github.com/ferdium/ferdium-app/issues/1472) --- recipes/alibaba-chat/icon.svg | 37 ++ recipes/alibaba-chat/index.js | 1 + recipes/alibaba-chat/package.json | 9 + recipes/alibaba-chat/webview.js | 19 + recipes/canva/icon.svg | 27 + recipes/canva/index.js | 1 + recipes/canva/package.json | 9 + recipes/canva/webview.js | 16 + recipes/drawio/icon.svg | 20 + recipes/drawio/index.js | 1 + recipes/drawio/package.json | 9 + recipes/drawio/webview.js | 16 + recipes/fandom/icon.svg | 21 + recipes/fandom/index.js | 1 + recipes/fandom/package.json | 9 + recipes/fandom/webview.js | 16 + recipes/fiverr/icon.svg | 15 + recipes/fiverr/index.js | 1 + recipes/fiverr/package.json | 10 + recipes/fiverr/webview.js | 16 + recipes/google-maps/icon.svg | 20 + recipes/google-maps/index.js | 1 + recipes/google-maps/package.json | 9 + recipes/google-maps/webview.js | 16 + recipes/hacker-news/icon.svg | 1 + recipes/hacker-news/index.js | 1 + recipes/hacker-news/package.json | 9 + recipes/hacker-news/webview.js | 16 + recipes/infomaniak-kdrive/icon.svg | 34 ++ recipes/infomaniak-kdrive/index.js | 1 + recipes/infomaniak-kdrive/package.json | 9 + recipes/infomaniak-kdrive/webview.js | 16 + recipes/mastodeck/icon.svg | 983 +++++++++++++++++++++++++++++++++ recipes/mastodeck/index.js | 1 + recipes/mastodeck/package.json | 9 + recipes/mastodeck/webview.js | 9 + recipes/ms-planner/icon.svg | 15 + recipes/ms-planner/index.js | 27 + recipes/ms-planner/package.json | 14 + recipes/ms-planner/service.css | 15 + recipes/ms-planner/webview.js | 40 ++ recipes/notion-calendar/icon.svg | 31 ++ recipes/notion-calendar/index.js | 1 + recipes/notion-calendar/package.json | 10 + recipes/notion-calendar/webview.js | 16 + recipes/patreon/icon.svg | 31 ++ recipes/patreon/index.js | 1 + recipes/patreon/package.json | 9 + recipes/patreon/webview.js | 16 + recipes/penpot/icon.svg | 14 + recipes/penpot/index.js | 1 + recipes/penpot/package.json | 11 + recipes/penpot/webview.js | 16 + recipes/purelymail/icon.svg | 31 ++ recipes/purelymail/index.js | 1 + recipes/purelymail/package.json | 10 + recipes/purelymail/webview.js | 16 + recipes/romeo/icon.svg | 20 + recipes/romeo/index.js | 1 + recipes/romeo/package.json | 10 + recipes/romeo/webview.js | 16 + recipes/sogo/icon.svg | 20 + recipes/sogo/index.js | 1 + recipes/sogo/package.json | 10 + recipes/sogo/webview.js | 20 + recipes/superlist/icon.svg | 13 + recipes/superlist/index.js | 1 + recipes/superlist/package.json | 10 + recipes/superlist/webview.js | 16 + 69 files changed, 1853 insertions(+) create mode 100644 recipes/alibaba-chat/icon.svg create mode 100644 recipes/alibaba-chat/index.js create mode 100644 recipes/alibaba-chat/package.json create mode 100644 recipes/alibaba-chat/webview.js create mode 100644 recipes/canva/icon.svg create mode 100644 recipes/canva/index.js create mode 100644 recipes/canva/package.json create mode 100644 recipes/canva/webview.js create mode 100644 recipes/drawio/icon.svg create mode 100644 recipes/drawio/index.js create mode 100644 recipes/drawio/package.json create mode 100644 recipes/drawio/webview.js create mode 100644 recipes/fandom/icon.svg create mode 100644 recipes/fandom/index.js create mode 100644 recipes/fandom/package.json create mode 100644 recipes/fandom/webview.js create mode 100644 recipes/fiverr/icon.svg create mode 100644 recipes/fiverr/index.js create mode 100644 recipes/fiverr/package.json create mode 100644 recipes/fiverr/webview.js create mode 100644 recipes/google-maps/icon.svg create mode 100644 recipes/google-maps/index.js create mode 100644 recipes/google-maps/package.json create mode 100644 recipes/google-maps/webview.js create mode 100644 recipes/hacker-news/icon.svg create mode 100644 recipes/hacker-news/index.js create mode 100644 recipes/hacker-news/package.json create mode 100644 recipes/hacker-news/webview.js create mode 100644 recipes/infomaniak-kdrive/icon.svg create mode 100644 recipes/infomaniak-kdrive/index.js create mode 100644 recipes/infomaniak-kdrive/package.json create mode 100644 recipes/infomaniak-kdrive/webview.js create mode 100644 recipes/mastodeck/icon.svg create mode 100644 recipes/mastodeck/index.js create mode 100644 recipes/mastodeck/package.json create mode 100644 recipes/mastodeck/webview.js create mode 100644 recipes/ms-planner/icon.svg create mode 100644 recipes/ms-planner/index.js create mode 100644 recipes/ms-planner/package.json create mode 100644 recipes/ms-planner/service.css create mode 100644 recipes/ms-planner/webview.js create mode 100644 recipes/notion-calendar/icon.svg create mode 100644 recipes/notion-calendar/index.js create mode 100644 recipes/notion-calendar/package.json create mode 100644 recipes/notion-calendar/webview.js create mode 100644 recipes/patreon/icon.svg create mode 100644 recipes/patreon/index.js create mode 100644 recipes/patreon/package.json create mode 100644 recipes/patreon/webview.js create mode 100644 recipes/penpot/icon.svg create mode 100644 recipes/penpot/index.js create mode 100644 recipes/penpot/package.json create mode 100644 recipes/penpot/webview.js create mode 100644 recipes/purelymail/icon.svg create mode 100644 recipes/purelymail/index.js create mode 100644 recipes/purelymail/package.json create mode 100644 recipes/purelymail/webview.js create mode 100644 recipes/romeo/icon.svg create mode 100644 recipes/romeo/index.js create mode 100644 recipes/romeo/package.json create mode 100644 recipes/romeo/webview.js create mode 100644 recipes/sogo/icon.svg create mode 100644 recipes/sogo/index.js create mode 100644 recipes/sogo/package.json create mode 100644 recipes/sogo/webview.js create mode 100644 recipes/superlist/icon.svg create mode 100644 recipes/superlist/index.js create mode 100644 recipes/superlist/package.json create mode 100644 recipes/superlist/webview.js (limited to 'recipes') diff --git a/recipes/alibaba-chat/icon.svg b/recipes/alibaba-chat/icon.svg new file mode 100644 index 0000000..005a6a7 --- /dev/null +++ b/recipes/alibaba-chat/icon.svg @@ -0,0 +1,37 @@ + + + + + + + + + + diff --git a/recipes/alibaba-chat/index.js b/recipes/alibaba-chat/index.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/alibaba-chat/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/alibaba-chat/package.json b/recipes/alibaba-chat/package.json new file mode 100644 index 0000000..323f81b --- /dev/null +++ b/recipes/alibaba-chat/package.json @@ -0,0 +1,9 @@ +{ + "id": "alibaba-chat", + "name": "Alibaba Chat", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://message.alibaba.com/message/messenger.htm" + } +} diff --git a/recipes/alibaba-chat/webview.js b/recipes/alibaba-chat/webview.js new file mode 100644 index 0000000..4c3f67d --- /dev/null +++ b/recipes/alibaba-chat/webview.js @@ -0,0 +1,19 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + +module.exports = Ferdium => { + // TODO: If your SNAME service has unread messages, uncomment these lines to implement the logic for updating the badges + const getMessages = () => { + // TODO: Insert your notification-finding code here + const count = document.querySelector( + '#im-list > div > div.im-conversation-list-container > div.im-next-tabs.im-next-tabs-pure.im-next-tabs-scrollable.im-next-medium.list-tab > div.im-next-tabs-bar > div > div > div > ul > li:nth-child(2) > div > div > span.red-num', + ); + Ferdium.setBadge(count, 0); + }; + Ferdium.loop(getMessages); + + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); +}; diff --git a/recipes/canva/icon.svg b/recipes/canva/icon.svg new file mode 100644 index 0000000..e0bd934 --- /dev/null +++ b/recipes/canva/icon.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/recipes/canva/index.js b/recipes/canva/index.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/canva/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/canva/package.json b/recipes/canva/package.json new file mode 100644 index 0000000..eeebd4e --- /dev/null +++ b/recipes/canva/package.json @@ -0,0 +1,9 @@ +{ + "id": "canva", + "name": "Canva", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://canva.com" + } +} diff --git a/recipes/canva/webview.js b/recipes/canva/webview.js new file mode 100644 index 0000000..2a81dec --- /dev/null +++ b/recipes/canva/webview.js @@ -0,0 +1,16 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + +module.exports = Ferdium => { + // TODO: If your SNAME service has unread messages, uncomment these lines to implement the logic for updating the badges + // const getMessages = () => { + // // TODO: Insert your notification-finding code here + // Ferdium.setBadge(0, 0); + // }; + // Ferdium.loop(getMessages); + + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); +}; diff --git a/recipes/drawio/icon.svg b/recipes/drawio/icon.svg new file mode 100644 index 0000000..ee65a9c --- /dev/null +++ b/recipes/drawio/icon.svg @@ -0,0 +1,20 @@ + + + + + + + + + + diff --git a/recipes/drawio/index.js b/recipes/drawio/index.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/drawio/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/drawio/package.json b/recipes/drawio/package.json new file mode 100644 index 0000000..3a555cb --- /dev/null +++ b/recipes/drawio/package.json @@ -0,0 +1,9 @@ +{ + "id": "drawio", + "name": "Draw.io", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://app.diagrams.net/" + } +} diff --git a/recipes/drawio/webview.js b/recipes/drawio/webview.js new file mode 100644 index 0000000..2a81dec --- /dev/null +++ b/recipes/drawio/webview.js @@ -0,0 +1,16 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + +module.exports = Ferdium => { + // TODO: If your SNAME service has unread messages, uncomment these lines to implement the logic for updating the badges + // const getMessages = () => { + // // TODO: Insert your notification-finding code here + // Ferdium.setBadge(0, 0); + // }; + // Ferdium.loop(getMessages); + + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); +}; diff --git a/recipes/fandom/icon.svg b/recipes/fandom/icon.svg new file mode 100644 index 0000000..96959d6 --- /dev/null +++ b/recipes/fandom/icon.svg @@ -0,0 +1,21 @@ + + + + + + + + + diff --git a/recipes/fandom/index.js b/recipes/fandom/index.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/fandom/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/fandom/package.json b/recipes/fandom/package.json new file mode 100644 index 0000000..318d761 --- /dev/null +++ b/recipes/fandom/package.json @@ -0,0 +1,9 @@ +{ + "id": "fandom", + "name": "Fandom", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://www.fandom.com" + } +} diff --git a/recipes/fandom/webview.js b/recipes/fandom/webview.js new file mode 100644 index 0000000..2a81dec --- /dev/null +++ b/recipes/fandom/webview.js @@ -0,0 +1,16 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + +module.exports = Ferdium => { + // TODO: If your SNAME service has unread messages, uncomment these lines to implement the logic for updating the badges + // const getMessages = () => { + // // TODO: Insert your notification-finding code here + // Ferdium.setBadge(0, 0); + // }; + // Ferdium.loop(getMessages); + + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); +}; diff --git a/recipes/fiverr/icon.svg b/recipes/fiverr/icon.svg new file mode 100644 index 0000000..1e71430 --- /dev/null +++ b/recipes/fiverr/icon.svg @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/recipes/fiverr/index.js b/recipes/fiverr/index.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/fiverr/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/fiverr/package.json b/recipes/fiverr/package.json new file mode 100644 index 0000000..6f9f630 --- /dev/null +++ b/recipes/fiverr/package.json @@ -0,0 +1,10 @@ +{ + "id": "fiverr", + "name": "Fiverr", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://www.fiverr.com/inbox/", + "hasNotificationSound": true + } +} diff --git a/recipes/fiverr/webview.js b/recipes/fiverr/webview.js new file mode 100644 index 0000000..2a81dec --- /dev/null +++ b/recipes/fiverr/webview.js @@ -0,0 +1,16 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + +module.exports = Ferdium => { + // TODO: If your SNAME service has unread messages, uncomment these lines to implement the logic for updating the badges + // const getMessages = () => { + // // TODO: Insert your notification-finding code here + // Ferdium.setBadge(0, 0); + // }; + // Ferdium.loop(getMessages); + + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); +}; diff --git a/recipes/google-maps/icon.svg b/recipes/google-maps/icon.svg new file mode 100644 index 0000000..298ceae --- /dev/null +++ b/recipes/google-maps/icon.svg @@ -0,0 +1,20 @@ + + + + + + + + + + diff --git a/recipes/google-maps/index.js b/recipes/google-maps/index.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/google-maps/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/google-maps/package.json b/recipes/google-maps/package.json new file mode 100644 index 0000000..e2a0d35 --- /dev/null +++ b/recipes/google-maps/package.json @@ -0,0 +1,9 @@ +{ + "id": "google-maps", + "name": "Google Maps", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://www.google.com/maps" + } +} diff --git a/recipes/google-maps/webview.js b/recipes/google-maps/webview.js new file mode 100644 index 0000000..2a81dec --- /dev/null +++ b/recipes/google-maps/webview.js @@ -0,0 +1,16 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + +module.exports = Ferdium => { + // TODO: If your SNAME service has unread messages, uncomment these lines to implement the logic for updating the badges + // const getMessages = () => { + // // TODO: Insert your notification-finding code here + // Ferdium.setBadge(0, 0); + // }; + // Ferdium.loop(getMessages); + + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); +}; diff --git a/recipes/hacker-news/icon.svg b/recipes/hacker-news/icon.svg new file mode 100644 index 0000000..faac12a --- /dev/null +++ b/recipes/hacker-news/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/recipes/hacker-news/index.js b/recipes/hacker-news/index.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/hacker-news/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/hacker-news/package.json b/recipes/hacker-news/package.json new file mode 100644 index 0000000..0c9e406 --- /dev/null +++ b/recipes/hacker-news/package.json @@ -0,0 +1,9 @@ +{ + "id": "hacker-news", + "name": "Hacker News", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://news.ycombinator.com/" + } +} diff --git a/recipes/hacker-news/webview.js b/recipes/hacker-news/webview.js new file mode 100644 index 0000000..2a81dec --- /dev/null +++ b/recipes/hacker-news/webview.js @@ -0,0 +1,16 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + +module.exports = Ferdium => { + // TODO: If your SNAME service has unread messages, uncomment these lines to implement the logic for updating the badges + // const getMessages = () => { + // // TODO: Insert your notification-finding code here + // Ferdium.setBadge(0, 0); + // }; + // Ferdium.loop(getMessages); + + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); +}; diff --git a/recipes/infomaniak-kdrive/icon.svg b/recipes/infomaniak-kdrive/icon.svg new file mode 100644 index 0000000..cad4c94 --- /dev/null +++ b/recipes/infomaniak-kdrive/icon.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + diff --git a/recipes/infomaniak-kdrive/index.js b/recipes/infomaniak-kdrive/index.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/infomaniak-kdrive/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/infomaniak-kdrive/package.json b/recipes/infomaniak-kdrive/package.json new file mode 100644 index 0000000..2f6e0f5 --- /dev/null +++ b/recipes/infomaniak-kdrive/package.json @@ -0,0 +1,9 @@ +{ + "id": "infomaniak-kdrive", + "name": "Infomaniak KDrive", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://kdrive.infomaniak.com/" + } +} diff --git a/recipes/infomaniak-kdrive/webview.js b/recipes/infomaniak-kdrive/webview.js new file mode 100644 index 0000000..2a81dec --- /dev/null +++ b/recipes/infomaniak-kdrive/webview.js @@ -0,0 +1,16 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + +module.exports = Ferdium => { + // TODO: If your SNAME service has unread messages, uncomment these lines to implement the logic for updating the badges + // const getMessages = () => { + // // TODO: Insert your notification-finding code here + // Ferdium.setBadge(0, 0); + // }; + // Ferdium.loop(getMessages); + + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); +}; diff --git a/recipes/mastodeck/icon.svg b/recipes/mastodeck/icon.svg new file mode 100644 index 0000000..134947d --- /dev/null +++ b/recipes/mastodeck/icon.svg @@ -0,0 +1,983 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/recipes/mastodeck/index.js b/recipes/mastodeck/index.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/mastodeck/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/mastodeck/package.json b/recipes/mastodeck/package.json new file mode 100644 index 0000000..40370a0 --- /dev/null +++ b/recipes/mastodeck/package.json @@ -0,0 +1,9 @@ +{ + "id": "mastodeck", + "name": "Mastodeck", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://mastodeck.com" + } +} diff --git a/recipes/mastodeck/webview.js b/recipes/mastodeck/webview.js new file mode 100644 index 0000000..1119219 --- /dev/null +++ b/recipes/mastodeck/webview.js @@ -0,0 +1,9 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + +module.exports = Ferdium => { + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); +}; diff --git a/recipes/ms-planner/icon.svg b/recipes/ms-planner/icon.svg new file mode 100644 index 0000000..43a4cfc --- /dev/null +++ b/recipes/ms-planner/icon.svg @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/recipes/ms-planner/index.js b/recipes/ms-planner/index.js new file mode 100644 index 0000000..cc0b44a --- /dev/null +++ b/recipes/ms-planner/index.js @@ -0,0 +1,27 @@ +module.exports = Ferdium => + class Planner extends Ferdium { + overrideUserAgent() { + return window.navigator.userAgent + .replace(/(Ferdium|Electron)(\S+\s)/g, '') + .replace(/(Chrome\/)([^ ]*)/g, '$163.0.3239.84'); + } + + // https://docs.microsoft.com/en-us/microsoftteams/troubleshoot/teams-sign-in/sign-in-loop#resolution + knownCertificateHosts() { + return ['tasks.office.com']; + } + + // we need to allow all cookies for ms teams + onHeadersReceived(details, callback) { + if ( + details.responseHeaders && + details.responseHeaders['Set-Cookie'] && + details.responseHeaders['Set-Cookie'].length > 0 && + !details.responseHeaders['Set-Cookie'][0].includes('SameSite=none') + ) { + details.responseHeaders['Set-Cookie'][0] = + `${details.responseHeaders['Set-Cookie'][0]}; SameSite=none`; + } + callback({ cancel: false, responseHeaders: details.responseHeaders }); + } + }; diff --git a/recipes/ms-planner/package.json b/recipes/ms-planner/package.json new file mode 100644 index 0000000..ca74458 --- /dev/null +++ b/recipes/ms-planner/package.json @@ -0,0 +1,14 @@ +{ + "id": "ms-planner", + "name": "Microsoft Planner", + "aliases": [ + "office", + "tasks" + ], + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://tasks.office.com/", + "hasNotificationSound": true + } +} diff --git a/recipes/ms-planner/service.css b/recipes/ms-planner/service.css new file mode 100644 index 0000000..d28527c --- /dev/null +++ b/recipes/ms-planner/service.css @@ -0,0 +1,15 @@ +.app-wrapper-web .app, +.app-wrapper-web ._36Q2N, +.app-wrapper-web .h70RQ, +.app-wrapper-web ._3QfZd, +.app-wrapper-web ._1jJ70, +._1XkO3.two { + width: 100% !important; + max-width: 100% !important; + height: 100% !important; + top: 0 !important; +} + +._1Wk6A ._3YewW._31v_P._2Ptrm { + display: none; +} diff --git a/recipes/ms-planner/webview.js b/recipes/ms-planner/webview.js new file mode 100644 index 0000000..4dd73fd --- /dev/null +++ b/recipes/ms-planner/webview.js @@ -0,0 +1,40 @@ +const path = require('path'); + +setTimeout(() => { + const elem = document.querySelector('.landing-title.version-title'); + if (elem && elem.textContent.toLowerCase().includes('google chrome')) { + window.FerdiumAPI.clearCache(); + window.location.reload(); + } +}, 1000); + +const isMutedIcon = element => + element.parentElement.parentElement.querySelectorAll('*[data-icon="muted"]') + .length > 0; + +const isPinnedIcon = element => element.classList.contains('_1EFSv'); + +module.exports = Ferdium => { + const getMessages = function getMessages() { + const elements = document.querySelectorAll( + '.CxUIE, .unread, ._0LqQ, .m61XR .ZKn2B, .VOr2j, ._1V5O7 ._2vfYK, html[dir] ._23LrM, ._1pJ9J:not(._2XH9R)', + ); + let count = 0; + + for (const element of elements) { + try { + // originalLog(isMutedIcon(elements[i]), isPinnedIcon(elements[i])); + if (!isMutedIcon(element) && !isPinnedIcon(element)) { + count += 1; + } + } catch { + // nope; + } + } + + Ferdium.setBadge(count); + }; + + Ferdium.injectCSS(path.join(__dirname, 'service.css')); + Ferdium.loop(getMessages); +}; diff --git a/recipes/notion-calendar/icon.svg b/recipes/notion-calendar/icon.svg new file mode 100644 index 0000000..e7a9c1b --- /dev/null +++ b/recipes/notion-calendar/icon.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/recipes/notion-calendar/index.js b/recipes/notion-calendar/index.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/notion-calendar/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/notion-calendar/package.json b/recipes/notion-calendar/package.json new file mode 100644 index 0000000..672c823 --- /dev/null +++ b/recipes/notion-calendar/package.json @@ -0,0 +1,10 @@ +{ + "id": "notion-calendar", + "name": "Notion Calendar", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://calendar.notion.so/", + "hasNotificationSound": true + } +} diff --git a/recipes/notion-calendar/webview.js b/recipes/notion-calendar/webview.js new file mode 100644 index 0000000..2a81dec --- /dev/null +++ b/recipes/notion-calendar/webview.js @@ -0,0 +1,16 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + +module.exports = Ferdium => { + // TODO: If your SNAME service has unread messages, uncomment these lines to implement the logic for updating the badges + // const getMessages = () => { + // // TODO: Insert your notification-finding code here + // Ferdium.setBadge(0, 0); + // }; + // Ferdium.loop(getMessages); + + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); +}; diff --git a/recipes/patreon/icon.svg b/recipes/patreon/icon.svg new file mode 100644 index 0000000..b6ad167 --- /dev/null +++ b/recipes/patreon/icon.svg @@ -0,0 +1,31 @@ + + + + + diff --git a/recipes/patreon/index.js b/recipes/patreon/index.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/patreon/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/patreon/package.json b/recipes/patreon/package.json new file mode 100644 index 0000000..3aafa11 --- /dev/null +++ b/recipes/patreon/package.json @@ -0,0 +1,9 @@ +{ + "id": "patreon", + "name": "Patreon", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://www.patreon.com/login" + } +} diff --git a/recipes/patreon/webview.js b/recipes/patreon/webview.js new file mode 100644 index 0000000..2a81dec --- /dev/null +++ b/recipes/patreon/webview.js @@ -0,0 +1,16 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + +module.exports = Ferdium => { + // TODO: If your SNAME service has unread messages, uncomment these lines to implement the logic for updating the badges + // const getMessages = () => { + // // TODO: Insert your notification-finding code here + // Ferdium.setBadge(0, 0); + // }; + // Ferdium.loop(getMessages); + + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); +}; diff --git a/recipes/penpot/icon.svg b/recipes/penpot/icon.svg new file mode 100644 index 0000000..d51af20 --- /dev/null +++ b/recipes/penpot/icon.svg @@ -0,0 +1,14 @@ + + + + + + diff --git a/recipes/penpot/index.js b/recipes/penpot/index.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/penpot/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/penpot/package.json b/recipes/penpot/package.json new file mode 100644 index 0000000..980a4fd --- /dev/null +++ b/recipes/penpot/package.json @@ -0,0 +1,11 @@ +{ + "id": "penpot", + "name": "Penpot", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://design.penpot.app/", + "hasHostedOption": true, + "hasCustomUrl": true + } +} diff --git a/recipes/penpot/webview.js b/recipes/penpot/webview.js new file mode 100644 index 0000000..2a81dec --- /dev/null +++ b/recipes/penpot/webview.js @@ -0,0 +1,16 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + +module.exports = Ferdium => { + // TODO: If your SNAME service has unread messages, uncomment these lines to implement the logic for updating the badges + // const getMessages = () => { + // // TODO: Insert your notification-finding code here + // Ferdium.setBadge(0, 0); + // }; + // Ferdium.loop(getMessages); + + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); +}; diff --git a/recipes/purelymail/icon.svg b/recipes/purelymail/icon.svg new file mode 100644 index 0000000..2fc7b1d --- /dev/null +++ b/recipes/purelymail/icon.svg @@ -0,0 +1,31 @@ + + + + + Layer 3 + + + + + + + + + + + + + + + Layer 2 + + + + Layer 5 + + + + + + + \ No newline at end of file diff --git a/recipes/purelymail/index.js b/recipes/purelymail/index.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/purelymail/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/purelymail/package.json b/recipes/purelymail/package.json new file mode 100644 index 0000000..d09652b --- /dev/null +++ b/recipes/purelymail/package.json @@ -0,0 +1,10 @@ +{ + "id": "purelymail", + "name": "Purelymail", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://inbox.purelymail.com", + "hasNotificationSound": true + } +} diff --git a/recipes/purelymail/webview.js b/recipes/purelymail/webview.js new file mode 100644 index 0000000..2a81dec --- /dev/null +++ b/recipes/purelymail/webview.js @@ -0,0 +1,16 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + +module.exports = Ferdium => { + // TODO: If your SNAME service has unread messages, uncomment these lines to implement the logic for updating the badges + // const getMessages = () => { + // // TODO: Insert your notification-finding code here + // Ferdium.setBadge(0, 0); + // }; + // Ferdium.loop(getMessages); + + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); +}; diff --git a/recipes/romeo/icon.svg b/recipes/romeo/icon.svg new file mode 100644 index 0000000..8b92cb1 --- /dev/null +++ b/recipes/romeo/icon.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + diff --git a/recipes/romeo/index.js b/recipes/romeo/index.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/romeo/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/romeo/package.json b/recipes/romeo/package.json new file mode 100644 index 0000000..9ab0cb9 --- /dev/null +++ b/recipes/romeo/package.json @@ -0,0 +1,10 @@ +{ + "id": "romeo", + "name": "Romeo", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "http://romeo.com", + "hasNotificationSound": true + } +} diff --git a/recipes/romeo/webview.js b/recipes/romeo/webview.js new file mode 100644 index 0000000..2a81dec --- /dev/null +++ b/recipes/romeo/webview.js @@ -0,0 +1,16 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + +module.exports = Ferdium => { + // TODO: If your SNAME service has unread messages, uncomment these lines to implement the logic for updating the badges + // const getMessages = () => { + // // TODO: Insert your notification-finding code here + // Ferdium.setBadge(0, 0); + // }; + // Ferdium.loop(getMessages); + + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); +}; diff --git a/recipes/sogo/icon.svg b/recipes/sogo/icon.svg new file mode 100644 index 0000000..80b0994 --- /dev/null +++ b/recipes/sogo/icon.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + diff --git a/recipes/sogo/index.js b/recipes/sogo/index.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/sogo/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/sogo/package.json b/recipes/sogo/package.json new file mode 100644 index 0000000..b7e6656 --- /dev/null +++ b/recipes/sogo/package.json @@ -0,0 +1,10 @@ +{ + "id": "sogo", + "name": "SOGo", + "version": "1.0.0", + "license": "MIT", + "config": { + "hasCustomUrl": true, + "hasNotificationSound": true + } +} diff --git a/recipes/sogo/webview.js b/recipes/sogo/webview.js new file mode 100644 index 0000000..158fcb6 --- /dev/null +++ b/recipes/sogo/webview.js @@ -0,0 +1,20 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + +module.exports = Ferdium => { + const getMessages = () => { + let count = 0; + for (const e of document.querySelectorAll('.sg-counter-badge')) { + if (e.textContent && e.textContent !== '') { + count += Number.parseInt(e.textContent); + } + } + Ferdium.setBadge(count, 0); + }; + Ferdium.loop(getMessages); + + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); +}; diff --git a/recipes/superlist/icon.svg b/recipes/superlist/icon.svg new file mode 100644 index 0000000..980a47e --- /dev/null +++ b/recipes/superlist/icon.svg @@ -0,0 +1,13 @@ + + + + + + diff --git a/recipes/superlist/index.js b/recipes/superlist/index.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/superlist/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/superlist/package.json b/recipes/superlist/package.json new file mode 100644 index 0000000..a8bde3d --- /dev/null +++ b/recipes/superlist/package.json @@ -0,0 +1,10 @@ +{ + "id": "superlist", + "name": "Superlist", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://app.superlist.com", + "hasNotificationSound": true + } +} diff --git a/recipes/superlist/webview.js b/recipes/superlist/webview.js new file mode 100644 index 0000000..2a81dec --- /dev/null +++ b/recipes/superlist/webview.js @@ -0,0 +1,16 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + +module.exports = Ferdium => { + // TODO: If your SNAME service has unread messages, uncomment these lines to implement the logic for updating the badges + // const getMessages = () => { + // // TODO: Insert your notification-finding code here + // Ferdium.setBadge(0, 0); + // }; + // Ferdium.loop(getMessages); + + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); +}; -- cgit v1.2.3-70-g09d2