Skip to content

Commit

Permalink
Merge pull request #50 from jasonlong/fix-streak-measurement
Browse files Browse the repository at this point in the history
Fix streak measurement
  • Loading branch information
jasonlong committed May 24, 2016
2 parents 5feee9d + b212871 commit 780aa05
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 16 deletions.
7 changes: 4 additions & 3 deletions chrome/iso.js

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

2 changes: 1 addition & 1 deletion chrome/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Isometric Contributions",
"version": "1.0.9",
"version": "1.0.10",
"description": "Renders an isometric pixel view of GitHub contribution graphs.",
"content_scripts": [ {
"css": [ "iso.css" ],
Expand Down
7 changes: 4 additions & 3 deletions firefox/isometric-contributions/iso.js

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

2 changes: 1 addition & 1 deletion firefox/isometric-contributions/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Isometric Contributions",
"version": "1.0.9",
"version": "1.0.10",
"description": "Renders an isometric pixel view of GitHub contribution graphs.",
"content_scripts": [ {
"css": [ "iso.css" ],
Expand Down
4 changes: 2 additions & 2 deletions safari/isometric-contributions.safariextension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleShortVersionString</key>
<string>1.0.9</string>
<string>1.0.10</string>
<key>CFBundleVersion</key>
<string>1.0.9</string>
<string>1.0.10</string>
<key>Chrome</key>
<dict>
<key>Database Quota</key>
Expand Down
7 changes: 4 additions & 3 deletions safari/isometric-contributions.safariextension/iso.js

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

7 changes: 4 additions & 3 deletions src/iso.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -136,17 +136,18 @@ class Iso
if currentDayCount > 0
if tempStreak == 0
tempStreakStart = ($ this).data('date')
tempStreakEnd = ($ this).data('date')

tempStreak++

if tempStreak > streakLongest
streakLongest++
if tempStreak >= streakLongest
tempStreakEnd = ($ this).data('date')

else
if tempStreak == streakLongest
if tempStreak >= streakLongest
longestStreakStart = tempStreakStart
longestStreakEnd = tempStreakEnd
streakLongest = tempStreak

tempStreak = 0
tempStreakStart = null
Expand Down

0 comments on commit 780aa05

Please sign in to comment.