Skip to content

Commit

Permalink
Added Pixieset recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
bradreeve authored and vraravam committed Jun 29, 2023
1 parent 8cc162f commit 6b0c7a9
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
10 changes: 10 additions & 0 deletions recipes/pixieset/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions recipes/pixieset/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = Ferdium => Ferdium;
9 changes: 9 additions & 0 deletions recipes/pixieset/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"id": "pixieset",
"name": "Pixieset",
"version": "1.0.0",
"license": "MIT",
"config": {
"serviceURL": "https://accounts.pixieset.com/dashboard/"
}
}
10 changes: 10 additions & 0 deletions recipes/pixieset/webview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"use strict";

module.exports = (Ferdium) => {
const getMessages = () => {
const element = document.querySelector('.notification-count');
Ferdium.setBadge(element ? Ferdium.safeParseInt(element.textContent.match(/\d+/)[0]) : 0);
};

Ferdium.loop(getMessages);
};

0 comments on commit 6b0c7a9

Please sign in to comment.