Skip to content

Commit 03d1168

Browse files
committed
added delicious bookmarking support
1 parent 0614085 commit 03d1168

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

public/css/style.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,10 @@ input {
550550
background-image:url(images/pocket.png);
551551
}
552552

553+
.entry-sharedelicious {
554+
background-image:url(images/delicious.png);
555+
}
556+
553557
.entry-smartphone-share li.entry-shareemail,
554558
.entry-toolbar li.entry-shareemail {
555559
background-image:url(images/mail.png);

public/images/delicious.png

201 Bytes
Loading

public/js/selfoss-events-entriestoolbar.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ selfoss.events.entriesToolbar = function(parent) {
5454
return false;
5555
});
5656

57+
// share with delicious
58+
parent.find('.entry-sharedelicious').unbind('click').click(function(e) {
59+
var href = $(this).parents(".entry").children("a").eq(0).attr("href");
60+
var title = $(this).parents(".entry").children(".entry-title").html();
61+
window.open("https://delicious.com/save?url="+encodeURIComponent(href)+"&title="+encodeURIComponent(title));
62+
e.preventDefault();
63+
return false;
64+
});
65+
5766
// share with e-mail
5867
parent.find('.entry-shareemail').unbind('click').click(function(e) {
5968
document.location.href = "mailto:?body="+encodeURIComponent($(this).parents(".entry").children("a").eq(0).attr("href"))+"&subject="+encodeURIComponent($(this).parents(".entry").children(".entry-title").html());

templates/item.phtml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
<li class="entry-sharetwitter" title="twitter">twitter</li>
6161
<li class="entry-sharefacebook" title="facebook">facebook</li>
6262
<li class="entry-sharepocket" title="pocket">pocket</li>
63+
<li class="entry-sharedelicious" title="delicious">delicious</li>
6364
<li class="entry-shareemail" title="email">email</li>
6465
</ul>
6566
</div>
@@ -74,6 +75,7 @@
7475
<li class="entry-sharetwitter entry-share" title="twitter">&nbsp;</li>
7576
<li class="entry-sharefacebook entry-share" title="facebook">&nbsp;</li>
7677
<li class="entry-sharepocket entry-share" title="pocket">&nbsp;</li>
78+
<li class="entry-sharedelicious entry-share" title="delicious">&nbsp;</li>
7779
<li class="entry-shareemail entry-share" title="email">&nbsp;</li>
7880
<li class="entry-close"></li>
7981
</ul>

0 commit comments

Comments
 (0)