From 943deca4887f52ec73b8a05663947dd11a354d9b Mon Sep 17 00:00:00 2001 From: Jake Lee Date: Tue, 5 May 2020 08:01:34 +0100 Subject: Adds Guilded.gg recipe (#150) --- uncompressed/guilded/README.md | 8 ++++++++ uncompressed/guilded/icon.png | Bin 0 -> 13670 bytes uncompressed/guilded/icon.svg | 9 +++++++++ uncompressed/guilded/index.js | 3 +++ uncompressed/guilded/package.json | 14 ++++++++++++++ uncompressed/guilded/webview.js | 15 +++++++++++++++ 6 files changed, 49 insertions(+) create mode 100644 uncompressed/guilded/README.md create mode 100644 uncompressed/guilded/icon.png create mode 100644 uncompressed/guilded/icon.svg create mode 100644 uncompressed/guilded/index.js create mode 100644 uncompressed/guilded/package.json create mode 100644 uncompressed/guilded/webview.js (limited to 'uncompressed/guilded') diff --git a/uncompressed/guilded/README.md b/uncompressed/guilded/README.md new file mode 100644 index 0000000..caba8cf --- /dev/null +++ b/uncompressed/guilded/README.md @@ -0,0 +1,8 @@ +# Guilded for Ferdi +This is the unofficial Ferdi recipe for Guilded, it only supports the current server. + +### Release notes +1.0.0: First version + +### How to create your own Ferdi recipes: +* [Read the documentation](https://github.com/getferdi/recipes/blob/master/docs/integration.md) \ No newline at end of file diff --git a/uncompressed/guilded/icon.png b/uncompressed/guilded/icon.png new file mode 100644 index 0000000..e2cd5ae Binary files /dev/null and b/uncompressed/guilded/icon.png differ diff --git a/uncompressed/guilded/icon.svg b/uncompressed/guilded/icon.svg new file mode 100644 index 0000000..199d4a5 --- /dev/null +++ b/uncompressed/guilded/icon.svg @@ -0,0 +1,9 @@ + + + + Logomark / Guilded-Wordmark-Black + Created with Sketch. + + + + \ No newline at end of file diff --git a/uncompressed/guilded/index.js b/uncompressed/guilded/index.js new file mode 100644 index 0000000..e8243fb --- /dev/null +++ b/uncompressed/guilded/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = Franz => Franz; \ No newline at end of file diff --git a/uncompressed/guilded/package.json b/uncompressed/guilded/package.json new file mode 100644 index 0000000..fbb7eda --- /dev/null +++ b/uncompressed/guilded/package.json @@ -0,0 +1,14 @@ +{ + "id": "guilded", + "name": "Guilded", + "version": "1.0.0", + "description": "Guilded", + "main": "index.js", + "author": "Jake Lee ", + "license": "MIT", + "config": { + "serviceURL": "https://www.guilded.gg/", + "hasTeamId": false, + "hasNotificationSound": true + } +} diff --git a/uncompressed/guilded/webview.js b/uncompressed/guilded/webview.js new file mode 100644 index 0000000..371fac8 --- /dev/null +++ b/uncompressed/guilded/webview.js @@ -0,0 +1,15 @@ +"use strict"; + +module.exports = Franz => { + const getMessages = function getMessages() { + var unread = 0 + const notificationBadge = document.getElementsByClassName('NavSelectorItem-unread-badge')[0] + if (notificationBadge != undefined) { + const innerBadge = notificationBadge.getElementsByClassName('BadgeV2-count')[0] + unread = innerBadge.innerText; + } + Franz.setBadge(parseInt(unread, 10)); + }; + + Franz.loop(getMessages); +}; \ No newline at end of file -- cgit v1.2.3-70-g09d2