mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-18 18:40:58 +01:00
Merge branch 'master' into develop
This commit is contained in:
@@ -63,6 +63,12 @@ define('share', ['hooks'], function (hooks) {
|
||||
return openShare(linkedin_url, postUrl, 626, 436);
|
||||
});
|
||||
|
||||
addHandler('[component="share/mastodon"]', function () {
|
||||
const postUrl = getPostUrl($(this));
|
||||
const mastodon_url = `https://share.joinmastodon.org/#text=${encodeURIComponent(postUrl)}`;
|
||||
return openShare(mastodon_url, postUrl, 626, 760);
|
||||
});
|
||||
|
||||
hooks.fire('action:share.addHandlers', { openShare: openShare });
|
||||
};
|
||||
|
||||
|
||||
@@ -40,6 +40,11 @@ social.getPostSharing = async function () {
|
||||
name: 'LinkedIn',
|
||||
class: 'fa-brands fa-linkedin',
|
||||
},
|
||||
{
|
||||
id: 'mastodon',
|
||||
name: 'Mastodon',
|
||||
class: 'fa-brands fa-mastodon',
|
||||
},
|
||||
];
|
||||
networks = await plugins.hooks.fire('filter:social.posts', networks);
|
||||
networks.forEach((network) => {
|
||||
|
||||
Reference in New Issue
Block a user