Created
November 7, 2014 21:01
-
-
Save narendrans/8ba7b9d690b71f37bc8c to your computer and use it in GitHub Desktop.
Print title, link and score for each HN items
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Print title, link and score for each HN items | |
| // Inject jquery | |
| $('.title>a').each(function(index) { | |
| var titleLink = $(this).text() + "::" + $(this).attr("href"); | |
| var score = $(this).parent().parent().next().find($('[id^=score]')).text().replace(/[^\/\d]/g, ''); | |
| console.log(titleLink + "::" + score); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment