File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 manifest.json provides metadata used when your web app is added to the
99 homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
1010 -->
11- < link rel ="shortcut icon " href ="./favicon.svg ">
1211 <!--
1312 Notice the use of %PUBLIC_URL% in the tags above.
1413 It will be replaced with the URL of the `public` folder during the build.
4241 if ( ( window . location . search || '' ) . includes ( 'origin=openmrs' ) ) {
4342 window . location = '/#/search/?origin=openmrs&type=organizations'
4443 }
44+
45+ const prefersDarkMode = window . matchMedia ( '(prefers-color-scheme: dark)' ) ;
46+
47+ if ( prefersDarkMode . matches ) {
48+ const darkFavicon = document . createElement ( 'link' ) ;
49+ darkFavicon . rel = 'icon' ;
50+ darkFavicon . href = './dark-favicon.svg' ;
51+ document . head . appendChild ( darkFavicon ) ;
52+ } else {
53+ const lightFavicon = document . createElement ( 'link' ) ;
54+ lightFavicon . rel = 'icon' ;
55+ lightFavicon . href = './light-favicon.svg' ;
56+ document . head . appendChild ( lightFavicon ) ;
57+ }
4558 </ script >
4659 < title > </ title >
4760 </ head >
You can’t perform that action at this time.
0 commit comments