Skip to content

Commit

Permalink
add upwork recipe (#547)
Browse files Browse the repository at this point in the history
  • Loading branch information
sakarimov authored May 9, 2024
1 parent b6185a4 commit 5f86784
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 0 deletions.
45 changes: 45 additions & 0 deletions recipes/upwork/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/upwork/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/upwork/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"id": "upwork",
"name": "upwork",
"version": "1.0.0",
"license": "MIT",
"config": {
"serviceURL": "https://www.upwork.com/ab/notifications/"
}
}
17 changes: 17 additions & 0 deletions recipes/upwork/webview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}

const _path = _interopRequireDefault(require('path'));

module.exports = Ferdium => {
const getMessages = () => {
const directMessages = $('li .notification-row .d-inline-block')?.textContent;

Ferdium.setBadge(directMessages);
};

Ferdium.loop(getMessages);

Ferdium.injectCSS(_path.default.join(__dirname, 'service.css'));
};

0 comments on commit 5f86784

Please sign in to comment.