Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
sakarimov authored May 9, 2024
2 parents bf88eba + 1d74c9a commit 714ee55
Show file tree
Hide file tree
Showing 10 changed files with 111 additions and 5 deletions.
18 changes: 18 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -1360,6 +1360,24 @@
"contributions": [
"code"
]
},
{
"login": "Xaviju",
"name": "Xaviju",
"avatar_url": "https://avatars.githubusercontent.com/u/1343702?v=4",
"profile": "https://github.com/Xaviju",
"contributions": [
"code"
]
},
{
"login": "real-or-random",
"name": "Tim Ruffing",
"avatar_url": "https://avatars.githubusercontent.com/u/1071625?v=4",
"profile": "https://github.com/real-or-random",
"contributions": [
"code"
]
}
],
"commitType": "docs"
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<a href="https://github.com/ferdium/ferdium-recipes/actions/workflows/builds.yml"><img alt="Build Status" src="https://github.com/ferdium/ferdium-recipes/actions/workflows/builds.yml/badge.svg?branch=main&event=push"></a>
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
<a href='#contributors-'><img src='https://img.shields.io/badge/contributors-149-default.svg?logo=github' alt='Contributors'/></a>
<a href='#contributors-'><img src='https://img.shields.io/badge/contributors-151-default.svg?logo=github' alt='Contributors'/></a>
<!-- ALL-CONTRIBUTORS-BADGE:END -->
<!-- TODO: Uncomment once we get funding sorted
<a href="#backers-via-opencollective"><img alt="Open Collective backers" src="https://img.shields.io/opencollective/backers/getferdi?logo=open-collective"></a>
Expand Down Expand Up @@ -229,6 +229,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<tr>
<td align="center" valign="top" width="14.28%"><a href='https://github.com/marcosins' title='Marco: code'><img src='https://avatars.githubusercontent.com/u/14003389?v=4' alt='marcosins' style='width:100px;'/></a></td>
<td align="center" valign="top" width="14.28%"><a href='https://github.com/YaMoef' title='Brent Claessens: code'><img src='https://avatars.githubusercontent.com/u/34712836?v=4' alt='YaMoef' style='width:100px;'/></a></td>
<td align="center" valign="top" width="14.28%"><a href='https://github.com/Xaviju' title='Xaviju: code'><img src='https://avatars.githubusercontent.com/u/1343702?v=4' alt='Xaviju' style='width:100px;'/></a></td>
<td align="center" valign="top" width="14.28%"><a href='https://github.com/real-or-random' title='Tim Ruffing: code'><img src='https://avatars.githubusercontent.com/u/1071625?v=4' alt='real-or-random' style='width:100px;'/></a></td>
</tr>
</tbody>
</table>
Expand Down
2 changes: 1 addition & 1 deletion recipes/msteams/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "msteams",
"name": "Microsoft Teams",
"version": "3.3.1",
"version": "3.3.2",
"license": "MIT",
"aliases": [
"teamsChat"
Expand Down
10 changes: 9 additions & 1 deletion recipes/msteams/webview.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,17 @@ const _path = _interopRequireDefault(require('path'));
module.exports = Ferdium => {
const getMessages = () => {
let messages = 0;
const badges = document.querySelectorAll(

const isTeamsV2 = window.location.href.includes('/v2/');

let badges = document.querySelectorAll(
'.activity-badge.dot-activity-badge .activity-badge',
);

if (isTeamsV2) {
badges = document.querySelectorAll('.fui-Badge');
}

if (badges) {
Array.prototype.forEach.call(badges, badge => {
messages += Ferdium.safeParseInt(badge.textContent);
Expand Down
4 changes: 2 additions & 2 deletions recipes/reddit-chat/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"id": "reddit-chat",
"name": "Reddit Chat",
"version": "1.3.1",
"version": "1.3.2",
"license": "MIT",
"config": {
"serviceURL": "https://www.reddit.com/chat/"
"serviceURL": "https://chat.reddit.com/"
}
}
48 changes: 48 additions & 0 deletions recipes/taiga/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/taiga/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = Ferdium => Ferdium;
10 changes: 10 additions & 0 deletions recipes/taiga/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"id": "taiga",
"name": "Taiga",
"version": "1.0.0",
"license": "MIT",
"repository": "https://github.com/kaleidos-ventures/taiga",
"config": {
"serviceURL": "https://tree.taiga.io"
}
}
3 changes: 3 additions & 0 deletions recipes/taiga/service.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body {
background-color: white;
}
16 changes: 16 additions & 0 deletions recipes/taiga/webview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}

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

module.exports = Ferdium => {
// TODO: If your Taiga service has unread messages, uncomment these lines to implement the logic for updating the badges
// const getMessages = () => {
// // TODO: Insert your notification-finding code here
// Ferdium.setBadge(0, 0);
// };
// Ferdium.loop(getMessages);

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

0 comments on commit 714ee55

Please sign in to comment.