Skip to content

Commit

Permalink
Uses the lists page which seems cheap. Checks every 5 minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
n8 committed Oct 18, 2011
1 parent b1360e3 commit 32c0dd0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
10 changes: 5 additions & 5 deletions main.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ class YCombo

chrome.browserAction.onClicked.addListener (tab) =>
chrome.tabs.create {'url':"http://news.ycombinator.com/submitted?id=#{@hacker_news_id}"}

start: ->
@syncYCData()

# @syncYCData()

syncYCData: ->
url = "http://news.ycombinator.com"
url = "http://news.ycombinator.com/lists"
$.get url, (data) =>
returned = $(data)
tops = $(".pagetop", returned)
Expand All @@ -28,6 +27,7 @@ class YCombo

# for testing
# store.set 'todays_karma', {'karma': 0, 'stored_at': day}
# store.remove 'todays_karma'

todays_karma = store.get 'todays_karma'

Expand All @@ -49,6 +49,6 @@ ycombo.start()
setInterval(
->
ycombo.syncYCData()
600000
300 * 1000
)

8 changes: 3 additions & 5 deletions main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Hacker News notifications",
"version": "1.0.3",
"version": "1.0.4",
"description": "I want to know my karma.",
"background_page": "bg.html",
"browser_action": {
Expand Down

0 comments on commit 32c0dd0

Please sign in to comment.