From f90e9581a651c9aa691fc4271613d4d75f4713a3 Mon Sep 17 00:00:00 2001 From: sulthankarimov Date: Thu, 9 May 2024 08:22:41 +0700 Subject: [PATCH 1/2] add recipes for freelancers (#534) --- recipes/guru/icon.svg | 62 +++++++++++++++++++++++++ recipes/guru/index.js | 1 + recipes/guru/package.json | 9 ++++ recipes/guru/webview.js | 19 ++++++++ recipes/peopleperhour/icon.svg | 74 ++++++++++++++++++++++++++++++ recipes/peopleperhour/index.js | 1 + recipes/peopleperhour/package.json | 9 ++++ recipes/peopleperhour/webview.js | 19 ++++++++ recipes/truelancer/icon.svg | 62 +++++++++++++++++++++++++ recipes/truelancer/index.js | 1 + recipes/truelancer/package.json | 9 ++++ recipes/truelancer/webview.js | 19 ++++++++ 12 files changed, 285 insertions(+) create mode 100644 recipes/guru/icon.svg create mode 100644 recipes/guru/index.js create mode 100644 recipes/guru/package.json create mode 100644 recipes/guru/webview.js create mode 100644 recipes/peopleperhour/icon.svg create mode 100644 recipes/peopleperhour/index.js create mode 100644 recipes/peopleperhour/package.json create mode 100644 recipes/peopleperhour/webview.js create mode 100644 recipes/truelancer/icon.svg create mode 100644 recipes/truelancer/index.js create mode 100644 recipes/truelancer/package.json create mode 100644 recipes/truelancer/webview.js diff --git a/recipes/guru/icon.svg b/recipes/guru/icon.svg new file mode 100644 index 000000000..8b19048ca --- /dev/null +++ b/recipes/guru/icon.svg @@ -0,0 +1,62 @@ + + + + diff --git a/recipes/guru/index.js b/recipes/guru/index.js new file mode 100644 index 000000000..dd41f7287 --- /dev/null +++ b/recipes/guru/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/guru/package.json b/recipes/guru/package.json new file mode 100644 index 000000000..fa1c01de4 --- /dev/null +++ b/recipes/guru/package.json @@ -0,0 +1,9 @@ +{ + "id": "guru", + "name": "guru.com", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://www.guru.com/pro/messages.aspx" + } +} diff --git a/recipes/guru/webview.js b/recipes/guru/webview.js new file mode 100644 index 000000000..4ffefa05c --- /dev/null +++ b/recipes/guru/webview.js @@ -0,0 +1,19 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + +module.exports = Ferdium => { + const getMessages = () => { + const directMessages = $( + '.module_btn.lonely_btn.white_btn.globalHeader__btn.accountDropdownBtn', + )?.textContent; + + Ferdium.setBadge(directMessages); + }; + + Ferdium.loop(getMessages); + + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); +}; diff --git a/recipes/peopleperhour/icon.svg b/recipes/peopleperhour/icon.svg new file mode 100644 index 000000000..881abb894 --- /dev/null +++ b/recipes/peopleperhour/icon.svg @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + diff --git a/recipes/peopleperhour/index.js b/recipes/peopleperhour/index.js new file mode 100644 index 000000000..dd41f7287 --- /dev/null +++ b/recipes/peopleperhour/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/peopleperhour/package.json b/recipes/peopleperhour/package.json new file mode 100644 index 000000000..a08e8cbe8 --- /dev/null +++ b/recipes/peopleperhour/package.json @@ -0,0 +1,9 @@ +{ + "id": "peopleperhour", + "name": "People Per Hour", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://www.peopleperhour.com/notification/list" + } +} diff --git a/recipes/peopleperhour/webview.js b/recipes/peopleperhour/webview.js new file mode 100644 index 000000000..18ba3810f --- /dev/null +++ b/recipes/peopleperhour/webview.js @@ -0,0 +1,19 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + +module.exports = Ferdium => { + const getMessages = () => { + const directMessages = $( + '.notification-item.col-xs-12.clearfix.unread', + )?.length; + + Ferdium.setBadge(directMessages); + }; + + Ferdium.loop(getMessages); + + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); +}; diff --git a/recipes/truelancer/icon.svg b/recipes/truelancer/icon.svg new file mode 100644 index 000000000..490ceb6bd --- /dev/null +++ b/recipes/truelancer/icon.svg @@ -0,0 +1,62 @@ + + + + diff --git a/recipes/truelancer/index.js b/recipes/truelancer/index.js new file mode 100644 index 000000000..dd41f7287 --- /dev/null +++ b/recipes/truelancer/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/truelancer/package.json b/recipes/truelancer/package.json new file mode 100644 index 000000000..3968d91c5 --- /dev/null +++ b/recipes/truelancer/package.json @@ -0,0 +1,9 @@ +{ + "id": "truelancer", + "name": "Truelancer", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://www.truelancer.com/notifications?page=1" + } +} diff --git a/recipes/truelancer/webview.js b/recipes/truelancer/webview.js new file mode 100644 index 000000000..faba167c2 --- /dev/null +++ b/recipes/truelancer/webview.js @@ -0,0 +1,19 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + +module.exports = Ferdium => { + const getMessages = () => { + const directMessages = document.querySelectorAll( + '.MuiBox-root .mui-12z0wuy', + )?.length; + + Ferdium.setBadge(directMessages); + }; + + Ferdium.loop(getMessages); + + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); +}; From b6185a4c1183b1bd296ac4d859ad29709fa62dc8 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Thu, 9 May 2024 06:53:14 +0530 Subject: [PATCH 2/2] add sakarimov as a contributor for code [skip ci] (#545) --- .all-contributorsrc | 9 +++++++++ README.md | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index d61309b92..546c30d6d 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1378,6 +1378,15 @@ "contributions": [ "code" ] + }, + { + "login": "sakarimov", + "name": "sulthankarimov", + "avatar_url": "https://avatars.githubusercontent.com/u/5676876?v=4", + "profile": "https://sulthankarimov.my.id", + "contributions": [ + "code" + ] } ], "commitType": "docs" diff --git a/README.md b/README.md index 458b23acd..705ae2b05 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Build Status -Contributors +Contributors