aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/office365-owa
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/office365-owa')
-rw-r--r--recipes/office365-owa/LICENSE21
-rw-r--r--recipes/office365-owa/README.md5
-rw-r--r--recipes/office365-owa/icon.pngbin0 -> 45435 bytes
-rw-r--r--recipes/office365-owa/icon.svg1
-rw-r--r--recipes/office365-owa/index.js1
-rw-r--r--recipes/office365-owa/package.json17
-rw-r--r--recipes/office365-owa/webview.js33
7 files changed, 78 insertions, 0 deletions
diff --git a/recipes/office365-owa/LICENSE b/recipes/office365-owa/LICENSE
new file mode 100644
index 0000000..e46b0c5
--- /dev/null
+++ b/recipes/office365-owa/LICENSE
@@ -0,0 +1,21 @@
1MIT License
2
3Copyright (c) 2017 Adam Birds
4
5Permission is hereby granted, free of charge, to any person obtaining a copy
6of this software and associated documentation files (the "Software"), to deal
7in the Software without restriction, including without limitation the rights
8to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9copies of the Software, and to permit persons to whom the Software is
10furnished to do so, subject to the following conditions:
11
12The above copyright notice and this permission notice shall be included in all
13copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21SOFTWARE.
diff --git a/recipes/office365-owa/README.md b/recipes/office365-owa/README.md
new file mode 100644
index 0000000..a35ef46
--- /dev/null
+++ b/recipes/office365-owa/README.md
@@ -0,0 +1,5 @@
1# Office 365 Outlook Web App for Franz
2This is the Franz 5 Recipe for Office 365 Outlook Web App
3
4### How to create your own Franz recipes:
5* [Read the documentation](https://github.com/meetfranz/plugins)
diff --git a/recipes/office365-owa/icon.png b/recipes/office365-owa/icon.png
new file mode 100644
index 0000000..b4281c4
--- /dev/null
+++ b/recipes/office365-owa/icon.png
Binary files differ
diff --git a/recipes/office365-owa/icon.svg b/recipes/office365-owa/icon.svg
new file mode 100644
index 0000000..a1437c7
--- /dev/null
+++ b/recipes/office365-owa/icon.svg
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><title>OfficeCore10_32x_24x_20x_16x_01-22-2019</title><g id="STYLE_COLOR" data-name="STYLE = COLOR"><path d="M28.59554,2H11.404A1.404,1.404,0,0,0,10,3.40407L10,5l9.69,3L29.99961,5v-1.596A1.40405,1.40405,0,0,0,28.59554,2Z" fill="#0364b8"/><path d="M31.6499,17.40548A11.34148,11.34148,0,0,0,32,16.00043a.66592.66592,0,0,0-.33331-.57679v-.00048l-.01282-.00727-.004-.00225L20.81213,9.2395a1.49877,1.49877,0,0,0-.14532-.08276V9.15668a1.5003,1.5003,0,0,0-1.33331,0l-.00006.00006a1.49088,1.49088,0,0,0-.14527.08276L8.3504,15.41364l-.004.00225-.01275.00727v.00048a.666.666,0,0,0-.33331.57679,11.34354,11.34354,0,0,0,.35009,1.405l11.49171,8.405Z" fill="#0a2767"/><polygon points="24 5 17 5 14.979 8 17 11 24 17 30 17 30 11 24 5" fill="#28a8ea"/><rect x="10" y="5" width="6.99985" height="5.99999" fill="#0078d4"/><rect x="23.99969" y="5" width="5.99992" height="5.99997" fill="#50d9ff"/><polygon points="24 17 17 11 10 11 10 17 17 23 27.832 24.768 24 17" fill="#0364b8"/><line x1="10.03118" y1="5.00001" x2="29.99961" y2="5" fill="none"/><rect x="16.99971" y="11" width="7.00001" height="5.99999" fill="#0078d4"/><rect x="10" y="17" width="6.99978" height="6" fill="#064a8c"/><rect x="23.99973" y="17" width="5.99992" height="6" fill="#0078d4"/><path d="M20.19093,25.21763,8.39736,16.61718,8.8915,15.748s10.745,6.12012,10.90905,6.21191a.5285.5285,0,0,0,.4209-.0122c.15332-.08643,10.93249-6.23,10.93249-6.23l.49609.86914Z" fill="#0a2767" opacity="0.5"/><path d="M31.66669,16.57678v.00049l-.01325.00757-.00335.00189-10.838,6.1742a1.49672,1.49672,0,0,1-1.46045.09118L23.12632,27.913,31.38037,29.71l-.0003.00446A1.49756,1.49756,0,0,0,32,28.5V16.00006A.666.666,0,0,1,31.66669,16.57678Z" fill="#1490df"/><path d="M32,28.5v-.738l-9.98291-5.68756-1.205.68647a1.49685,1.49685,0,0,1-1.46045.09118L23.12634,27.913l8.254,1.79694-.0003.00446A1.49756,1.49756,0,0,0,32,28.5Z" opacity="0.05"/><path d="M31.95,28.88342,21.00708,22.64984l-.19495.11109a1.49685,1.49685,0,0,1-1.46045.09118L23.12634,27.913l8.254,1.79694-.0003.00446A1.50132,1.50132,0,0,0,31.95,28.88342Z" opacity="0.1"/><path d="M8.35,16.59v-.01H8.34l-.03-.02A.65068.65068,0,0,1,8,16V28.5A1.498,1.498,0,0,0,9.5,30h21a1.50264,1.50264,0,0,0,.37-.05.63693.63693,0,0,0,.18-.06.14177.14177,0,0,0,.06-.02,1.04752,1.04752,0,0,0,.23-.13c.02-.01.03-.01.04-.03Z" fill="#28a8ea"/><path d="M18,24.66663V8.33331A1.33727,1.33727,0,0,0,16.66663,7h-6.6355v4h.00006v3.456l-1.68085.95759-.004.00225-.01281.00727v.00048a.66591.66591,0,0,0-.33332.57679l.00019.00421L8,16.001V26h8.66663A1.33732,1.33732,0,0,0,18,24.66663Z" opacity="0.1"/><path d="M17,25.66663V9.33331A1.33727,1.33727,0,0,0,15.66663,8h-5.6355v3h.00006v3.456l-1.68085.95759-.004.00225-.01281.00727v.00048a.66591.66591,0,0,0-.33332.57679l.00019.00421L8,16.001V27h7.66663A1.33732,1.33732,0,0,0,17,25.66663Z" opacity="0.2"/><path d="M17,23.66663V9.33331A1.33727,1.33727,0,0,0,15.66663,8h-5.6355v3h.00006v3.456l-1.68085.95759-.004.00225-.01281.00727v.00048a.66591.66591,0,0,0-.33332.57679l.00019.00421L8,16.001V25h7.66663A1.33732,1.33732,0,0,0,17,23.66663Z" opacity="0.2"/><path d="M16,23.66663V9.33331A1.33727,1.33727,0,0,0,14.66663,8h-4.6355v3h.00006v3.456l-1.68085.95759-.004.00225-.01281.00727v.00048a.66591.66591,0,0,0-.33332.57679l.00019.00421L8,16.001V25h6.66663A1.33732,1.33732,0,0,0,16,23.66663Z" opacity="0.2"/><path id="Back_Plate" data-name="Back Plate" d="M1.33348,8H14.66668A1.33332,1.33332,0,0,1,16,9.33332V22.66666A1.33333,1.33333,0,0,1,14.66667,24H1.33347A1.33332,1.33332,0,0,1,.00015,22.66667V9.33333A1.33333,1.33333,0,0,1,1.33348,8Z" fill="#0078d4"/><path d="M3.86661,13.468a4.18142,4.18142,0,0,1,1.64192-1.8139A4.9652,4.9652,0,0,1,8.11808,11a4.61691,4.61691,0,0,1,2.414.62036,4.13906,4.13906,0,0,1,1.59809,1.733,5.59694,5.59694,0,0,1,.55967,2.54889,5.90136,5.90136,0,0,1-.57653,2.66689A4.239,4.239,0,0,1,10.468,20.36277,4.79917,4.79917,0,0,1,7.963,21a4.72864,4.72864,0,0,1-2.46794-.62711,4.20422,4.20422,0,0,1-1.61833-1.73635A5.4589,5.4589,0,0,1,3.31031,16.118,6.05522,6.05522,0,0,1,3.86661,13.468Zm1.74981,4.25826a2.71627,2.71627,0,0,0,.92379,1.19352,2.41142,2.41142,0,0,0,1.443.43493A2.533,2.533,0,0,0,9.524,18.90627a2.60284,2.60284,0,0,0,.89682-1.1969,4.62569,4.62569,0,0,0,.28658-1.66554,5.06271,5.06271,0,0,0-.26972-1.68578,2.6687,2.6687,0,0,0-.86648-1.24073,2.3873,2.3873,0,0,0-1.52729-.472,2.493,2.493,0,0,0-1.47672.4383,2.741,2.741,0,0,0-.944,1.20364,4.77582,4.77582,0,0,0-.00674,3.439Z" fill="#fff"/><rect x="0.00002" width="32" height="32" fill="none"/></g></svg> \ No newline at end of file
diff --git a/recipes/office365-owa/index.js b/recipes/office365-owa/index.js
new file mode 100644
index 0000000..9157a2e
--- /dev/null
+++ b/recipes/office365-owa/index.js
@@ -0,0 +1 @@
module.exports = Franz => Franz; \ No newline at end of file
diff --git a/recipes/office365-owa/package.json b/recipes/office365-owa/package.json
new file mode 100644
index 0000000..1ffb2ee
--- /dev/null
+++ b/recipes/office365-owa/package.json
@@ -0,0 +1,17 @@
1{
2 "id": "office365-owa",
3 "name": "Office 365 Outlook Web App",
4 "version": "1.1.1",
5 "description": "Office 365 Outlook Web App",
6 "main": "index.js",
7 "author": "Adam Birds <adam.birds@adbtechltd.co.uk>",
8 "contributors": [
9 "nonAlgebraic <https://github.com/nonAlgebraic>"
10 ],
11 "license": "MIT",
12 "config": {
13 "serviceURL": "https://outlook.office365.com/owa",
14 "hasNotificationSound": true,
15 "hasTeamId": false
16 }
17}
diff --git a/recipes/office365-owa/webview.js b/recipes/office365-owa/webview.js
new file mode 100644
index 0000000..ae21e19
--- /dev/null
+++ b/recipes/office365-owa/webview.js
@@ -0,0 +1,33 @@
1'use strict';
2
3module.exports = Franz => {
4 const getMessages = function getMessages() {
5 let unreadMail = 0;
6
7 if (location.pathname.match(/\/owa/)) {
8 // classic app
9 unreadMail = parseInt(
10 jQuery("span[title*='Inbox'] + div > span")
11 .first()
12 .text(),
13 10
14 );
15 } else {
16 // new app
17 const folders = document.querySelector('div[title="Folders"]');
18 if (!folders) {
19 return;
20 }
21
22 unreadMail = [...folders.parentNode.parentNode.children].reduce((count, child) => {
23 const unread = child.querySelector('.screenReaderOnly');
24 return unread && unread.textContent === 'unread'
25 ? count + parseInt(unread.previousSibling.textContent, 10)
26 : count;
27 }, 0);
28 }
29
30 Franz.setBadge(unreadMail);
31 };
32 Franz.loop(getMessages);
33};