11// import * as $ from "jquery";
2- import { greeting } from "./time" ;
3- import { vidGen } from "./video" ;
2+ import { greeting } from "./time" ;
3+ import { vidGen } from "./video" ;
44import * as BS from "bootstrap" ;
55
66// window.showem = function(iden) {
@@ -12,10 +12,11 @@ import * as BS from "bootstrap";
1212// let mCollection = new Object;
1313//
1414function timer ( ms : number ) {
15- return new Promise ( resolve => setTimeout ( ( ) => resolve ( true ) , ms ) ) ;
15+ return new Promise ( resolve => setTimeout ( ( ) => resolve ( true ) , ms ) ) ;
1616}
17+
1718async function startToast ( x : number ) {
18- await timer ( x ) ;
19+ await timer ( x ) ;
1920 let toastLive = document . getElementById ( 'liveToast' ) ;
2021 let toastbody = document . querySelector ( '#liveToast .toast-body' ) ;
2122 let toastheader = document . querySelector ( '#liveToast .me-auto' ) ;
@@ -26,24 +27,28 @@ async function startToast(x: number) {
2627 let toast = new BS . Toast ( toastLive ) ;
2728 toast . show ( ) ;
2829}
30+
31+ vidGen ( ) . then ( ( ) => {
32+ startToast ( 5000 ) . then ( ( ) => console . log ( "Toast has launched!" ) ) ;
33+ } ) ;
2934// async function closeSidebar(x) {
3035// await timer(x);
3136// mCollection.sidenav[0].close();
3237// }
3338//
34- document . addEventListener ( 'DOMContentLoaded' , function ( ) {
35- // let elems = [
36- // document.querySelectorAll('.collapsible'),
37- // document.querySelectorAll('.tooltipped'),
38- // document.querySelectorAll('.sidenav'),
39- // ];
40- // mCollection.collInst = M.Collapsible.init(elems[0]);
41- // mCollection.toolInst = M.Tooltip.init(elems[1], {"position": "right"});
42- // mCollection.sidenav = M.Sidenav.init(elems[2]);
43- startToast ( 5000 ) . then ( ( ) => console . log ( "Toast has launched!" ) ) ;
44- vidGen ( ) ;
45- console . log ( "STARTING!" ) ;
46- } ) ;
39+ // document.addEventListener('DOMContentLoaded', function() {
40+ // // let elems = [
41+ // // document.querySelectorAll('.collapsible'),
42+ // // document.querySelectorAll('.tooltipped'),
43+ // // document.querySelectorAll('.sidenav'),
44+ // // ];
45+ // // mCollection.collInst = M.Collapsible.init(elems[0]);
46+ // // mCollection.toolInst = M.Tooltip.init(elems[1], {"position": "right"});
47+ // // mCollection.sidenav = M.Sidenav.init(elems[2]);
48+ // startToast(5000).then(() => console.log("Toast has launched!"));
49+ // vidGen();
50+ // console.log("STARTING!");
51+ // });
4752//
4853// document.querySelector("#menu").addEventListener("click", function() {
4954// //console.log(this.getAttribute("class"));
0 commit comments