From 7576ea7f6b6f68d3e19474be06b38123d918ee5d Mon Sep 17 00:00:00 2001 From: Vijay A Date: Sun, 29 Aug 2021 11:06:10 +0530 Subject: cleanup: Remove duplicated recipes for Outlook Web App and Enterprise OWA. Fixes #523 --- recipes/enterprise-owa/LICENSE | 21 --------------------- recipes/enterprise-owa/README.md | 5 ----- recipes/enterprise-owa/icon.svg | 1 - recipes/enterprise-owa/index.js | 1 - recipes/enterprise-owa/package.json | 11 ----------- recipes/enterprise-owa/webview.js | 32 -------------------------------- recipes/office365-owa/package.json | 7 +++++-- recipes/outlook/LICENSE | 19 ------------------- recipes/outlook/README.md | 5 ----- recipes/outlook/icon.svg | 1 - recipes/outlook/index.js | 5 ----- recipes/outlook/package.json | 10 ---------- recipes/outlook/webview.js | 33 --------------------------------- 13 files changed, 5 insertions(+), 146 deletions(-) delete mode 100644 recipes/enterprise-owa/LICENSE delete mode 100644 recipes/enterprise-owa/README.md delete mode 100644 recipes/enterprise-owa/icon.svg delete mode 100644 recipes/enterprise-owa/index.js delete mode 100644 recipes/enterprise-owa/package.json delete mode 100644 recipes/enterprise-owa/webview.js delete mode 100644 recipes/outlook/LICENSE delete mode 100644 recipes/outlook/README.md delete mode 100644 recipes/outlook/icon.svg delete mode 100644 recipes/outlook/index.js delete mode 100644 recipes/outlook/package.json delete mode 100644 recipes/outlook/webview.js (limited to 'recipes') diff --git a/recipes/enterprise-owa/LICENSE b/recipes/enterprise-owa/LICENSE deleted file mode 100644 index e46b0c5..0000000 --- a/recipes/enterprise-owa/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 Adam Birds - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/recipes/enterprise-owa/README.md b/recipes/enterprise-owa/README.md deleted file mode 100644 index a35ef46..0000000 --- a/recipes/enterprise-owa/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Office 365 Outlook Web App for Franz -This is the Franz 5 Recipe for Office 365 Outlook Web App - -### How to create your own Franz recipes: -* [Read the documentation](https://github.com/meetfranz/plugins) diff --git a/recipes/enterprise-owa/icon.svg b/recipes/enterprise-owa/icon.svg deleted file mode 100644 index 4ba34c9..0000000 --- a/recipes/enterprise-owa/icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/recipes/enterprise-owa/index.js b/recipes/enterprise-owa/index.js deleted file mode 100644 index 23607bd..0000000 --- a/recipes/enterprise-owa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = Ferdi => Ferdi; diff --git a/recipes/enterprise-owa/package.json b/recipes/enterprise-owa/package.json deleted file mode 100644 index 2e0ac2c..0000000 --- a/recipes/enterprise-owa/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "id": "enterprise-owa", - "name": "Enterprise Outlook Web App", - "version": "1.2.0", - "license": "MIT", - "config": { - "serviceURL": "https://owa.yourcompany.com/owa", - "hasCustomUrl": true, - "hasNotificationSound": true - } -} diff --git a/recipes/enterprise-owa/webview.js b/recipes/enterprise-owa/webview.js deleted file mode 100644 index de007b3..0000000 --- a/recipes/enterprise-owa/webview.js +++ /dev/null @@ -1,32 +0,0 @@ -module.exports = Ferdi => { - const getMessages = function getMessages() { - let unreadMail = 0; - - if (location.pathname.match(/\/owa/)) { - // classic app - unreadMail = parseInt( - jQuery("span[title*='Inbox'] + div > span") - .first() - .text(), - 10, - ); - } else { - // new app - const folders = document.querySelector('div[title="Folders"]'); - if (!folders) { - return; - } - - unreadMail = [...folders.parentNode.children].reduce((count, child) => { - const unread = child.querySelector('.screenReaderOnly'); - return unread && unread.textContent === 'unread' - ? count + parseInt(unread.previousSibling.textContent, 10) - : count; - }, 0); - } - - Ferdi.setBadge(unreadMail); - }; - - Ferdi.loop(getMessages); -}; diff --git a/recipes/office365-owa/package.json b/recipes/office365-owa/package.json index 63e4a32..1192347 100644 --- a/recipes/office365-owa/package.json +++ b/recipes/office365-owa/package.json @@ -1,8 +1,11 @@ { "id": "office365-owa", - "name": "Office 365 Outlook Web App", - "version": "1.3.0", + "name": "Office 365 Outlook", + "version": "1.4.0", "license": "MIT", + "aliases": [ + "live.com" + ], "config": { "serviceURL": "https://outlook.office365.com/mail/", "hasNotificationSound": true, diff --git a/recipes/outlook/LICENSE b/recipes/outlook/LICENSE deleted file mode 100644 index 6802bc4..0000000 --- a/recipes/outlook/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -MIT License - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/recipes/outlook/README.md b/recipes/outlook/README.md deleted file mode 100644 index 47dbb00..0000000 --- a/recipes/outlook/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Outlook Web App for Ferdi -This is the Ferdi 5 Recipe for Outlook Web App - -### How to create your own Ferdi recipes: -* [Read the documentation](https://github.com/getferdi/recipes/blob/master/docs/integration.md.) diff --git a/recipes/outlook/icon.svg b/recipes/outlook/icon.svg deleted file mode 100644 index 19b1242..0000000 --- a/recipes/outlook/icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/recipes/outlook/index.js b/recipes/outlook/index.js deleted file mode 100644 index 89568a6..0000000 --- a/recipes/outlook/index.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = Ferdi => class Outlook extends Ferdi { - overrideUserAgent() { - return window.navigator.userAgent.replace(/(Ferdi|Electron)\/\S+ \([^)]+\)/g, '').trim(); - } -}; diff --git a/recipes/outlook/package.json b/recipes/outlook/package.json deleted file mode 100644 index 103325b..0000000 --- a/recipes/outlook/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id": "outlook", - "name": "Outlook Web App", - "version": "1.2.0", - "license": "MIT", - "config": { - "serviceURL": "https://outlook.live.com/mail/", - "hasNotificationSound": true - } -} diff --git a/recipes/outlook/webview.js b/recipes/outlook/webview.js deleted file mode 100644 index 123158e..0000000 --- a/recipes/outlook/webview.js +++ /dev/null @@ -1,33 +0,0 @@ -module.exports = Ferdi => { - function getMessages() { - let unreadMail = 0; - - if (location.pathname.match(/\/owa/)) { - // classic app - unreadMail = parseInt( - jQuery("span[title*='Inbox'] + div > span") - .first() - .text(), - 10, - ); - } else { - // new app - const favorites = document.querySelector('div[title="Favorites"]'); - if (!favorites) { - return; - } - const folders = Array.from(favorites.nextSibling.childNodes); - - unreadMail = folders.reduce((count, child) => { - const unread = child.querySelector('.screenReaderOnly'); - return unread && unread.textContent === 'unread' - ? count + parseInt(unread.previousSibling.textContent, 10) - : count; - }, 0); - } - - Ferdi.setBadge(unreadMail); - } - - Ferdi.loop(getMessages); -}; -- cgit v1.2.3-54-g00ecf