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 < link rel ="stylesheet " href ="main.css ">
99 < script src ="https://unpkg.com/mathjs@13.0.0/lib/browser/math.js "> </ script >
1010 < script type ="module " src ="date.js "> </ script >
11+ < link rel ="stylesheet " type ="text/css " href ="https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css ">
1112 < style >
1213 html , body , .content {
1314 height : 100% ;
447448 update ( ) ;
448449 } ) ;
449450 </ script >
451+
452+ < script type ="text/javascript " src ="https://cdn.jsdelivr.net/npm/toastify-js "> </ script >
453+ < script src ="changelog.js "> </ script >
450454 </ body >
451455</ html >
Original file line number Diff line number Diff line change 99 < script src ="jquery-3.6.0.min.js "> </ script >
1010 < script src ="https://unpkg.com/mathjs@13.0.0/lib/browser/math.js "> </ script >
1111 < script type ="module " src ="date.js "> </ script >
12+ < link rel ="stylesheet " type ="text/css " href ="https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css ">
1213 < script >
1314 function getType ( o ) {
1415 return Object . prototype . toString . call ( o ) . match ( / ^ \[ o b j e c t \s ( .* ) \] $ / ) [ 1 ] . toLowerCase ( ) ;
146147 < a href ="/documentation "> Documentation</ a >
147148 < a href ="https://github.com/samfundev/TextFieldCalculator "> Source</ a >
148149 </ footer >
150+
151+ < script type ="text/javascript " src ="https://cdn.jsdelivr.net/npm/toastify-js "> </ script >
152+ < script src ="changelog.js "> </ script >
149153 </ body >
150154</ html >
Original file line number Diff line number Diff line change 1+ const lastVisit = JSON . parse ( localStorage . getItem ( "lastVisit" ) ?? "null" ) ;
2+ const update = 1760245980778 ; // Timestamp of last update
3+
4+ localStorage . setItem ( "lastVisit" , Date . now ( ) . toString ( ) ) ;
5+
6+ if ( lastVisit && lastVisit < update ) {
7+ Toastify ( {
8+ text : "TCF now supports doing calculations with dates and durations. Click here to learn more." ,
9+ destination : "/documentation" ,
10+ duration : 5000 ,
11+ close : true ,
12+ gravity : "bottom" ,
13+ position : "right" ,
14+ stopOnFocus : true ,
15+ style : {
16+ fontSize : "16px" ,
17+ }
18+ } ) . showToast ( ) ;
19+ }
You can’t perform that action at this time.
0 commit comments