Add a link to share on Mamot

parent ea1da51a
Pipeline #1676 passed with stage
in 44 seconds
......@@ -123,6 +123,13 @@ function ShareMessage(req) {
+ encodeURIComponent(this.getTitle() + ' ' + this.getContent())
+ '&url=' + encodeURIComponent(this.getUrl());
}
this.getMastodonLink = function() {
return 'https://mamot.fr/share?text='
+ encodeURIComponent(this.getTitle()
+ ' ' + this.getContent()
+ ' ' + this.getUrl());
}
}
app.get('/generate.png', function (req, res) {
......@@ -132,6 +139,9 @@ app.get('/generate.png', function (req, res) {
if (req.query.target === 'diaspora') {
return res.redirect(message.getDiasporaLink())
}
else if (req.query.target === 'mastodon') {
return res.redirect(message.getMastodonLink())
}
else if (req.query.target === 'facebook') {
return res.redirect(message.getFacebookLink());
}
......
......@@ -123,6 +123,9 @@ html(lang=locale)
span.fa.fa-refresh
button(type="submit" name="target" value="randomize" formaction="" formtarget="_self").randomize.white-button
span.fa.fa-random
button(type="submit" name="target" value="mastodon").white-button
span.text
=_('Mamot') + ' '
button(type="submit" name="target" value="diaspora").white-button
span.text
=_('Diaspora*') + ' '
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment