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 <span class =" oi oi-random" aria-hidden =" true" ></span > Randomize
99 </NavLink >
1010 <NavLink class =" ffr-nav" href =" WhatsNew" >
11- <span class =" oi oi-question-mark " aria-hidden =" true" ></span > Help!
11+ <span class =" oi oi-puzzle-piece " aria-hidden =" true" ></span > Help
1212 </NavLink >
13- <NavLink class =" ffr-nav" href =" https://github.com/FiendsOfTheElements/FF1Randomizer/releases " >
14- <span class =" oi oi-data-transfer-download " aria-hidden =" true" ></span > Download
13+ <NavLink class =" ffr-nav" href =" javascript:showPWAInstall() " >
14+ <span class =" oi oi-hard-drive " aria-hidden =" true" ></span > Install
1515 </NavLink >
1616 <NavLink class =" ffr-nav" href =" https://github.com/FiendsOfTheElements/FF1Randomizer/issues" >
17- <span class =" oi oi-bug" aria-hidden =" true" ></span > Report a Bug
17+ <span class =" oi oi-bug" aria-hidden =" true" ></span > Issues
1818 </NavLink >
1919 <NavLink class =" ffr-nav" href =" About" >
2020 <span class =" oi oi-book" aria-hidden =" true" ></span > About
Original file line number Diff line number Diff line change @@ -118,3 +118,14 @@ function updateServiceWorkerNow() {
118118 window . location . reload ( ) ;
119119 }
120120}
121+
122+ let pwa ;
123+ window . addEventListener ( 'beforeinstallprompt' , ( e ) => {
124+ e . preventDefault ( ) ;
125+ pwa = e ;
126+ } ) ;
127+
128+ function showPWAInstall ( ) {
129+ pwa ?. prompt ( ) ;
130+ pwa = null ;
131+ }
You can’t perform that action at this time.
0 commit comments