aboutsummaryrefslogtreecommitdiffstats
path: root/recipes
diff options
context:
space:
mode:
authorLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2021-09-12 17:31:57 +0530
committerLibravatar GitHub <noreply@github.com>2021-09-12 12:01:57 +0000
commit97618c92c1d8f07e032974e1b0d5da580c4c483e (patch)
tree79fa1edfd535bb41098d11286ce188aa0bcbf485 /recipes
parentNew recipe: 'plek' (#699) (diff)
downloadferdium-recipes-97618c92c1d8f07e032974e1b0d5da580c4c483e.tar.gz
ferdium-recipes-97618c92c1d8f07e032974e1b0d5da580c4c483e.tar.zst
ferdium-recipes-97618c92c1d8f07e032974e1b0d5da580c4c483e.zip
New recipe: 'freshdesk' (#700)
Diffstat (limited to 'recipes')
-rw-r--r--recipes/freshdesk/icon.svg1
-rw-r--r--recipes/freshdesk/index.js2
-rw-r--r--recipes/freshdesk/package.json13
-rw-r--r--recipes/freshdesk/webview.js14
4 files changed, 30 insertions, 0 deletions
diff --git a/recipes/freshdesk/icon.svg b/recipes/freshdesk/icon.svg
new file mode 100644
index 0000000..ecb5c6e
--- /dev/null
+++ b/recipes/freshdesk/icon.svg
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64"><path d="M31.9 0h24.036A8 8 0 0 1 64 8.073V32.1C64 49.722 49.722 64 32.1 64h-.182A31.89 31.89 0 0 1 0 32.109C0 14.437 14.254.182 31.9 0z" fill="#25c16f"/><path d="M31.9 14.255c-8.093 0-14.654 6.56-14.654 14.654v9.964c.058 2.667 2.206 4.815 4.873 4.873h4.145V32.3h-5.6v-3.2c.34-6.026 5.327-10.74 11.364-10.74S43.04 23.065 43.38 29.1v3.2H37.7v11.454h3.745v.182c-.04 2.474-2.035 4.47-4.5 4.5h-4.473c-.364 0-.764.182-.764.545a.8.8 0 0 0 .764.764h4.5c3.205-.02 5.798-2.613 5.818-5.818v-.364a4.8 4.8 0 0 0 3.745-4.727V29.1c.182-8.254-6.364-14.836-14.654-14.836z" fill="#fff"/></svg> \ No newline at end of file
diff --git a/recipes/freshdesk/index.js b/recipes/freshdesk/index.js
new file mode 100644
index 0000000..4484d30
--- /dev/null
+++ b/recipes/freshdesk/index.js
@@ -0,0 +1,2 @@
1module.exports = Ferdi => class Freshdesk extends Ferdi {
2};
diff --git a/recipes/freshdesk/package.json b/recipes/freshdesk/package.json
new file mode 100644
index 0000000..0fc9faa
--- /dev/null
+++ b/recipes/freshdesk/package.json
@@ -0,0 +1,13 @@
1{
2 "id": "freshdesk",
3 "name": "Freshdesk",
4 "version": "1.0.0",
5 "license": "MIT",
6 "repository": "https://github.com/fisknils/recipe-freshdesk",
7 "config": {
8 "serviceURL": "https://{teamId}.freshdesk.com/a/tickets/filters/unresolved",
9 "urlInputSuffix": ".freshdesk.com/a/tickets/filters/unresolved",
10 "hasTeamId": "true",
11 "hasNotificationSound": true
12 }
13}
diff --git a/recipes/freshdesk/webview.js b/recipes/freshdesk/webview.js
new file mode 100644
index 0000000..884bfb6
--- /dev/null
+++ b/recipes/freshdesk/webview.js
@@ -0,0 +1,14 @@
1module.exports = Ferdi => {
2 const getMessages = function getMessages() {
3 $.get('/api/_/tickets?filter=unresolved', (data) => {
4 Ferdi.setBadge(data.tickets.length);
5 });
6 };
7
8 Ferdi.loop(getMessages);
9
10/* block popups (prevents freshconnect from opening in a new window) */
11 window.open = (function(url, name) {
12 console.log(`blocked window.open(${url}, ${name})`);
13 });
14};