aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/pipefy/webview.js
diff options
context:
space:
mode:
authorLibravatar Tania R. Zúñiga <taniazuniga.mx@gmail.com>2021-09-15 00:07:55 -0500
committerLibravatar GitHub <noreply@github.com>2021-09-15 10:37:55 +0530
commit50f93e4a5cc7c80d47bf85cd40de436aa3eb9619 (patch)
tree174f01d3b6041202b185bf10898138d2170abdd4 /recipes/pipefy/webview.js
parentAdded a check to verify that the folder name of the recipe matches the recipe... (diff)
downloadferdium-recipes-50f93e4a5cc7c80d47bf85cd40de436aa3eb9619.tar.gz
ferdium-recipes-50f93e4a5cc7c80d47bf85cd40de436aa3eb9619.tar.zst
ferdium-recipes-50f93e4a5cc7c80d47bf85cd40de436aa3eb9619.zip
🚀 Add Pipefy Recipe (#711)
Diffstat (limited to 'recipes/pipefy/webview.js')
-rw-r--r--recipes/pipefy/webview.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/recipes/pipefy/webview.js b/recipes/pipefy/webview.js
new file mode 100644
index 0000000..a3564c0
--- /dev/null
+++ b/recipes/pipefy/webview.js
@@ -0,0 +1,18 @@
1var _path = _interopRequireDefault(require('path'));
2
3function _interopRequireDefault(obj) {
4 return obj && obj.__esModule ? obj : { default: obj };
5}
6
7module.exports = Ferdi => {
8 const getMessages = function getMessages() {
9 const getNotificationButton = document.querySelector(
10 '#notifications_button',
11 );
12 let hasNotification = getNotificationButton.classList.contains('pp-active');
13 Ferdi.setBadge(0, hasNotification ? 1 : 0);
14 };
15 Ferdi.loop(getMessages);
16
17 Ferdi.injectCSS(_path.default.join(__dirname, 'service.css'));
18};