aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2012-03-11 10:00:26 +0100
committercedricbonhomme <devnull@localhost>2012-03-11 10:00:26 +0100
commit9e2d427e7c76bbb89d25e0e9b223eafecfa95e73 (patch)
treeceabb7e01c955e06667e87e20d2ca623be00c278
parentExport an article to plain text. (diff)
downloadnewspipe-9e2d427e7c76bbb89d25e0e9b223eafecfa95e73.tar.gz
newspipe-9e2d427e7c76bbb89d25e0e9b223eafecfa95e73.tar.bz2
newspipe-9e2d427e7c76bbb89d25e0e9b223eafecfa95e73.zip
Added button to share an article on Hacker News.
-rw-r--r--img/hacker-news.pngbin0 -> 265 bytes
-rwxr-xr-xpyAggr3g470r.py4
2 files changed, 4 insertions, 0 deletions
diff --git a/img/hacker-news.png b/img/hacker-news.png
new file mode 100644
index 00000000..ce92765d
--- /dev/null
+++ b/img/hacker-news.png
Binary files differ
diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py
index d3231260..cd01817c 100755
--- a/pyAggr3g470r.py
+++ b/pyAggr3g470r.py
@@ -525,6 +525,10 @@ class Root:
html += """\n\n<a href="http://identi.ca/index.php?action=newnotice&status_textarea=%s: %s" title="Share on Identi.ca" target="_blank"><img src="/img/identica.png" /></a>""" % \
(article["article_title"], article["article_link"])
+ # on Hacker News
+ html += """\n\n<a href='javascript:window.location="http://news.ycombinator.com/submitlink?u="+encodeURIComponent("%s")+"&t="+encodeURIComponent("%s")'><img src="/img/hacker-news.png" title="Share on Hacker News" /></a>""" % \
+ (article["article_link"], article["article_title"])
+
# on Pinboard
html += """\n\n\t<a href="https://api.pinboard.in/v1/posts/add?url=%s&description=%s"
rel="noreferrer" target="_blank">\n
bgstack15