Skip to content

Commit

Permalink
Add diaspora sharing button
Browse files Browse the repository at this point in the history
  • Loading branch information
Themroc authored and jtojnar committed Aug 6, 2019
1 parent 3472500 commit 54d555c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _docs/website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ <h2 id="configuration_params">Configuration</h2>
</tr>
<tr>
<td class="documentation-first-column">share</td>
<td>share defines which share buttons beneath the entry are visible. Default is share=tfpe (f = facebook, t = twitter, p = pocket, w = wallabag, e = email). When you would like to show only facebook and twitter share button use share=ft.</td>
<td>share defines which share buttons beneath the entry are visible. Default is share=tfpde (f = facebook, t = twitter, p = pocket, d = diaspora, w = wallabag, e = email). When you would like to show only facebook and twitter share button use share=ft.</td>
</tr>
<tr>
<td class="documentation-first-column">wallabag</td>
Expand Down
2 changes: 1 addition & 1 deletion defaults.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ auto_mark_as_read=0
auto_collapse=0
auto_stream_more=1
anonymizer=
share=tfpe
share=tfpde
wallabag=
wallabag_version=1
allow_public_update_access=
Expand Down
Binary file added public/images/diaspora.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/js/selfoss-shares.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ selfoss.shares = {
this.enabledShares = enabledShares;
this.initialized = true;

this.register('diaspora', 'd', function(url, title) {
window.open('https://share.diasporafoundation.org/?url=' + encodeURIComponent(url) + '&title=' + encodeURIComponent(title));
});
this.register('twitter', 't', function(url, title) {
window.open('https://twitter.com/intent/tweet?source=webclient&text=' + encodeURIComponent(title) + ' ' + encodeURIComponent(url));
});
Expand Down

0 comments on commit 54d555c

Please sign in to comment.