Skip to content

Commit 57ba870

Browse files
committed
Merge pull request fossar#359 from bbeardsley/only_anonymize_open
pass original url to everything except for opening the url
2 parents ed5262b + 3208e18 commit 57ba870

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

public/css/style.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,10 @@ input {
466466
text-decoration:none;
467467
}
468468

469+
.entry-link {
470+
display:none;
471+
}
472+
469473
.entry-source,
470474
.entry-separator,
471475
.entry-datetime {

public/js/selfoss-events-entriestoolbar.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,35 +28,35 @@ selfoss.events.entriesToolbar = function(parent) {
2828

2929
// share with google plus
3030
parent.find('.entry-sharegoogle').unbind('click').click(function(e) {
31-
window.open("https://plus.google.com/share?url="+encodeURIComponent($(this).parents(".entry").children("a").eq(0).attr("href")));
31+
window.open("https://plus.google.com/share?url="+encodeURIComponent($(this).parents(".entry").children(".entry-link").eq(0).attr("href")));
3232
e.preventDefault();
3333
return false;
3434
});
3535

3636
// share with twitter
3737
parent.find('.entry-sharetwitter').unbind('click').click(function(e) {
38-
window.open("https://twitter.com/intent/tweet?source=webclient&text="+encodeURIComponent($(this).parents(".entry").children(".entry-title").html())+" "+encodeURIComponent($(this).parents(".entry").children("a").eq(0).attr("href")));
38+
window.open("https://twitter.com/intent/tweet?source=webclient&text="+encodeURIComponent($(this).parents(".entry").children(".entry-title").html())+" "+encodeURIComponent($(this).parents(".entry").children(".entry-link").eq(0).attr("href")));
3939
e.preventDefault();
4040
return false;
4141
});
4242

4343
// share with facebook
4444
parent.find('.entry-sharefacebook').unbind('click').click(function(e) {
45-
window.open("https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent($(this).parents(".entry").children("a").eq(0).attr("href"))+"&t="+encodeURIComponent($(this).parents(".entry").children(".entry-title").html()));
45+
window.open("https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent($(this).parents(".entry").children(".entry-link").eq(0).attr("href"))+"&t="+encodeURIComponent($(this).parents(".entry").children(".entry-title").html()));
4646
e.preventDefault();
4747
return false;
4848
});
4949

5050
// share with pocket
5151
parent.find('.entry-sharepocket').unbind('click').click(function(e) {
52-
window.open(" https://getpocket.com/save?url="+encodeURIComponent($(this).parents(".entry").children("a").eq(0).attr("href"))+"&title="+encodeURIComponent($(this).parents(".entry").children(".entry-title").html()));
52+
window.open(" https://getpocket.com/save?url="+encodeURIComponent($(this).parents(".entry").children(".entry-link").eq(0).attr("href"))+"&title="+encodeURIComponent($(this).parents(".entry").children(".entry-title").html()));
5353
e.preventDefault();
5454
return false;
5555
});
5656

5757
// share with delicious
5858
parent.find('.entry-sharedelicious').unbind('click').click(function(e) {
59-
var href = $(this).parents(".entry").children("a").eq(0).attr("href");
59+
var href = $(this).parents(".entry").children(".entry-link").eq(0).attr("href");
6060
var title = $(this).parents(".entry").children(".entry-title").html();
6161
window.open("https://delicious.com/save?url="+encodeURIComponent(href)+"&title="+encodeURIComponent(title));
6262
e.preventDefault();
@@ -65,14 +65,14 @@ selfoss.events.entriesToolbar = function(parent) {
6565

6666
// share with readability
6767
parent.find('.entry-sharereadability').unbind('click').click(function(e) {
68-
window.open(" http://www.readability.com/save?url="+encodeURIComponent($(this).parents(".entry").children("a").eq(0).attr("href")));
68+
window.open(" http://www.readability.com/save?url="+encodeURIComponent($(this).parents(".entry").children(".entry-link").eq(0).attr("href")));
6969
e.preventDefault();
7070
return false;
7171
});
7272

7373
// share with e-mail
7474
parent.find('.entry-shareemail').unbind('click').click(function(e) {
75-
document.location.href = "mailto:?body="+encodeURIComponent($(this).parents(".entry").children("a").eq(0).attr("href"))+"&subject="+encodeURIComponent($(this).parents(".entry").children(".entry-title").html());
75+
document.location.href = "mailto:?body="+encodeURIComponent($(this).parents(".entry").children(".entry-link").eq(0).attr("href"))+"&subject="+encodeURIComponent($(this).parents(".entry").children(".entry-title").html());
7676
e.preventDefault();
7777
return false;
7878
});

templates/item.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535

3636
<!-- source -->
3737
<a href="<?PHP echo trim(\F3::get('anonymizer')) . $this->item['link']; ?>" class="entry-source entry-source<?PHP echo $this->item['source']; ?>" target="_blank"><?PHP echo $sourcetitle ?></a>
38+
<a href="<?PHP echo $this->item['link']; ?>" class="entry-link"></a>
3839

3940
<span class="entry-separator">&bull;</span>
4041

0 commit comments

Comments
 (0)