File tree 3 files changed +23
-12
lines changed
3 files changed +23
-12
lines changed Original file line number Diff line number Diff line change @@ -167,12 +167,28 @@ const loadStats = () => {
167
167
let currentStreakStart = null
168
168
let currentStreakEnd = null
169
169
170
- const data = [ ...document . querySelectorAll ( '.js-calendar-graph-table tbody td.ContributionCalendar-day' ) ] . map ( ( d ) => {
170
+ const dayNodes = [ ...document . querySelectorAll ( '.js-calendar-graph-table tbody td.ContributionCalendar-day' ) ] . map (
171
+ ( d ) => {
172
+ return {
173
+ date : new Date ( d . dataset . date ) ,
174
+ week : d . dataset . ix ,
175
+ color : getSquareColor ( d ) ,
176
+ tid : d . getAttribute ( 'aria-labelledby' )
177
+ }
178
+ }
179
+ )
180
+
181
+ const tooltipNodes = [ ...document . querySelectorAll ( '.js-calendar-graph tool-tip' ) ] . map ( ( t ) => {
182
+ return {
183
+ tid : t . id ,
184
+ count : getCountFromNode ( t )
185
+ }
186
+ } )
187
+
188
+ const data = dayNodes . map ( ( d ) => {
171
189
return {
172
- count : getCountFromNode ( d ) ,
173
- date : new Date ( d . dataset . date ) ,
174
- week : d . dataset . ix ,
175
- color : getSquareColor ( d )
190
+ ...d ,
191
+ ...tooltipNodes . find ( ( t ) => t . tid === d . tid )
176
192
}
177
193
} )
178
194
Original file line number Diff line number Diff line change 1
1
{
2
2
"manifest_version" : 2 ,
3
3
"name" : " GitHub Isometric Contributions" ,
4
- "version" : " 1.1.27 " ,
4
+ "version" : " 1.1.28 " ,
5
5
"description" : " Renders an isometric pixel view of GitHub contribution graphs." ,
6
6
"content_scripts" : [
7
7
{
Original file line number Diff line number Diff line change 1
1
{
2
2
"manifest_version" : 3 ,
3
3
"name" : " GitHub Isometric Contributions" ,
4
- "version" : " 1.1.27 " ,
4
+ "version" : " 1.1.28 " ,
5
5
"description" : " Renders an isometric pixel view of GitHub contribution graphs." ,
6
6
"content_scripts" : [
7
7
{
15
15
"icons" : {
16
16
"48" : " icon-48.png" ,
17
17
"128" : " icon-128.png"
18
- },
19
- "browser_specific_settings" : {
20
- "gecko" : {
21
-
22
- }
23
18
}
24
19
}
You can’t perform that action at this time.
0 commit comments