File tree Expand file tree Collapse file tree 3 files changed +7
-9
lines changed
Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 22 "manifest_version" : 3 ,
33 "name" : " Ecsta" ,
44 "short_name" : " Ecsta" ,
5- "version" : " 0.3.4 " ,
5+ "version" : " 0.3.5 " ,
66
77 "description" : " A simple new tab extension meant to stay out of your way while still making for great eye-candy." ,
88
Original file line number Diff line number Diff line change 22 "manifest_version" : 2 ,
33 "name" : " Ecsta" ,
44 "short_name" : " Ecsta" ,
5- "version" : " 0.3.4 " ,
5+ "version" : " 0.3.5 " ,
66
77 "description" : " A simple new tab extension meant to stay out of your way while still making for great eye-candy." ,
88
Original file line number Diff line number Diff line change @@ -3,15 +3,13 @@ const getLastFetchDate = localStorage.getItem("lastFetchDate");
33const UNSPLASH_API_KEY = localStorage . getItem ( "unsplashApiKey" ) ;
44var currentDate = new Date ( ) . toISOString ( ) . split ( "T" ) [ 0 ] ;
55
6- window . onload = ( ) => {
7- if ( window . matchMedia && window . matchMedia ( '(prefers-color-scheme: dark)' ) . matches ) {
8- document . getElementById ( "tabIcon" ) . setAttribute ( "href" , "res/icons/white-256.png" )
9- } else {
10- document . getElementById ( "tabIcon" ) . setAttribute ( "href" , "res/icons/black-256.png" )
11- }
12- }
136if ( UNSPLASH_API_KEY ) {
147 //Background code
8+ if ( window . matchMedia && window . matchMedia ( '(prefers-color-scheme: dark)' ) . matches ) {
9+ document . getElementById ( "tabIcon" ) . setAttribute ( "href" , "res/icons/white-256.png" )
10+ } else {
11+ document . getElementById ( "tabIcon" ) . setAttribute ( "href" , "res/icons/black-256.png" )
12+ }
1513 function set ( fetched ) {
1614 localStorage . setItem ( "fetchedBgImg" , fetched . urls . small + "" ) ;
1715 localStorage . setItem ( "unsplashApiCreditName" , fetched . user . name + "" ) ;
You can’t perform that action at this time.
0 commit comments