summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xhn/g6
1 files changed, 6 insertions, 0 deletions
diff --git a/hn/g b/hn/g
index ae80410..e8c7640 100755
--- a/hn/g
+++ b/hn/g
@@ -40,3 +40,9 @@
(if (empty? id) (error "athing:id: Unable to get id")
id)))
+(define (athing:link a)
+ (let* ((s (sxpath "//a[@class=\"storylink\"]"))
+ (l (s a)))
+ (list (sxml:attr (car l) 'href)
+ (sxml:text l))))
+