File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
- // GitHub Game of Life - 1.0.1
1
+ // GitHub Game of Life - 1.0.2
2
2
// Chris Johnson
3
3
// @defaced / defaced.dev / github.com/workeffortwaste
4
4
( function ( ) {
47
47
for ( let i = 0 ; i < contributions . length ; i ++ ) {
48
48
const days = contributions [ i ] . getElementsByTagName ( 'rect' )
49
49
for ( let d = 0 ; d < 7 ; d ++ ) { // Magic number - 7 days of the week.
50
- try { days [ d ] . setAttribute ( 'fill' , nextGenerationArray [ i ] [ d ] ? '#40c463' : '#ebedf0' ) } catch { }
50
+ if ( document . getElementsByTagName ( 'html' ) [ 0 ] . getAttribute ( 'data-color-mode' ) === 'dark' ) {
51
+ try { days [ d ] . setAttribute ( 'fill' , nextGenerationArray [ i ] [ d ] ? '#40c463' : '#161b22' ) } catch { }
52
+ } else {
53
+ try { days [ d ] . setAttribute ( 'fill' , nextGenerationArray [ i ] [ d ] ? '#40c463' : '#ebedf0' ) } catch { }
54
+ }
51
55
}
52
56
}
53
57
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " GitHub Game of Life" ,
3
3
"description" : " Replace the GitHub contributions graph with Conway's Game of Life." ,
4
- "version" : " 1.0.1 " ,
4
+ "version" : " 1.0.2 " ,
5
5
"icons" : {
6
6
"16" : " icon16.png" ,
7
7
"48" : " icon48.png" ,
You can’t perform that action at this time.
0 commit comments