File tree Expand file tree Collapse file tree 3 files changed +23
-12
lines changed
Expand file tree Collapse file tree 3 files changed +23
-12
lines changed Original file line number Diff line number Diff line change @@ -167,12 +167,28 @@ const loadStats = () => {
167167 let currentStreakStart = null
168168 let currentStreakEnd = null
169169
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 ) => {
171189 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 )
176192 }
177193 } )
178194
Original file line number Diff line number Diff line change 11{
22 "manifest_version" : 2 ,
33 "name" : " GitHub Isometric Contributions" ,
4- "version" : " 1.1.27 " ,
4+ "version" : " 1.1.28 " ,
55 "description" : " Renders an isometric pixel view of GitHub contribution graphs." ,
66 "content_scripts" : [
77 {
Original file line number Diff line number Diff line change 11{
22 "manifest_version" : 3 ,
33 "name" : " GitHub Isometric Contributions" ,
4- "version" : " 1.1.27 " ,
4+ "version" : " 1.1.28 " ,
55 "description" : " Renders an isometric pixel view of GitHub contribution graphs." ,
66 "content_scripts" : [
77 {
1515 "icons" : {
1616 "48" : " icon-48.png" ,
1717 "128" : " icon-128.png"
18- },
19- "browser_specific_settings" : {
20- "gecko" : {
21- 22- }
2318 }
2419}
You can’t perform that action at this time.
0 commit comments