From ef9b3a3c20d232094c861765e4c6ee105640108d Mon Sep 17 00:00:00 2001
From: Jonathan Winter <14960780+jhwinter@users.noreply.github.com>
Date: Sat, 19 Sep 2020 14:33:29 -0400
Subject: Add Monday recipe (#288)
---
uncompressed/monday/README.md | 5 +++++
uncompressed/monday/icon.png | Bin 0 -> 51909 bytes
uncompressed/monday/icon.svg | 36 ++++++++++++++++++++++++++++++++++++
uncompressed/monday/index.js | 3 +++
uncompressed/monday/package.json | 14 ++++++++++++++
uncompressed/monday/service.css | 3 +++
uncompressed/monday/webview.js | 29 +++++++++++++++++++++++++++++
7 files changed, 90 insertions(+)
create mode 100644 uncompressed/monday/README.md
create mode 100644 uncompressed/monday/icon.png
create mode 100644 uncompressed/monday/icon.svg
create mode 100644 uncompressed/monday/index.js
create mode 100644 uncompressed/monday/package.json
create mode 100644 uncompressed/monday/service.css
create mode 100755 uncompressed/monday/webview.js
(limited to 'uncompressed')
diff --git a/uncompressed/monday/README.md b/uncompressed/monday/README.md
new file mode 100644
index 0000000..3d95301
--- /dev/null
+++ b/uncompressed/monday/README.md
@@ -0,0 +1,5 @@
+# Monday for Franz
+Unofficial support for monday.com in Franz
+
+### How to create your own Franz recipes:
+* [Read the documentation](https://github.com/meetfranz/plugins)
diff --git a/uncompressed/monday/icon.png b/uncompressed/monday/icon.png
new file mode 100644
index 0000000..77b8980
Binary files /dev/null and b/uncompressed/monday/icon.png differ
diff --git a/uncompressed/monday/icon.svg b/uncompressed/monday/icon.svg
new file mode 100644
index 0000000..a7959f1
--- /dev/null
+++ b/uncompressed/monday/icon.svg
@@ -0,0 +1,36 @@
+
+
+
diff --git a/uncompressed/monday/index.js b/uncompressed/monday/index.js
new file mode 100644
index 0000000..e8243fb
--- /dev/null
+++ b/uncompressed/monday/index.js
@@ -0,0 +1,3 @@
+"use strict";
+
+module.exports = Franz => Franz;
\ No newline at end of file
diff --git a/uncompressed/monday/package.json b/uncompressed/monday/package.json
new file mode 100644
index 0000000..79ea17d
--- /dev/null
+++ b/uncompressed/monday/package.json
@@ -0,0 +1,14 @@
+{
+ "id": "monday",
+ "name": "Monday",
+ "version": "1.0.1",
+ "description": "Monday.com",
+ "main": "index.js",
+ "author": "Wilhelm Hjelm ",
+ "license": "MIT",
+ "config": {
+ "serviceURL": "https://{teamId}.monday.com",
+ "hasTeamId": true,
+ "urlInputSuffix": ".monday.com"
+ }
+}
diff --git a/uncompressed/monday/service.css b/uncompressed/monday/service.css
new file mode 100644
index 0000000..c4e4024
--- /dev/null
+++ b/uncompressed/monday/service.css
@@ -0,0 +1,3 @@
+#support_list {
+ display: none !important;
+}
diff --git a/uncompressed/monday/webview.js b/uncompressed/monday/webview.js
new file mode 100755
index 0000000..c5a58b6
--- /dev/null
+++ b/uncompressed/monday/webview.js
@@ -0,0 +1,29 @@
+"use strict";
+
+var _path = _interopRequireDefault(require("path"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+module.exports = Franz => {
+
+ const getMessages = function getMessages() {
+
+ let count = 0;
+
+ let counters = document.querySelectorAll('.surface-control-component .item-counter, .surface-control-component .view-item-counter');
+
+ for (var i = 0; i < counters.length; i++) {
+ count += parseInt(counters[i].textContent);
+ }
+
+ if (isNaN(count)) {
+ count = 0;
+ }
+
+ Franz.setBadge(count);
+ };
+
+ Franz.injectCSS(_path.default.join(__dirname, 'service.css'));
+ Franz.loop(getMessages);
+
+};
--
cgit v1.2.3-70-g09d2