File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 1+ /*
12let loading = document.querySelector(".loading-wrapper");
23window.onload = function () {
34 setTimeout(function () {
45 loading.style.display = "none";
56 }, 2000);
67};
8+ */
9+
10+ load ( "https://functionalty.netlify.app/" ) ;
11+ function load ( url ) {
12+ // displaying loading screen
13+ document . querySelector ( ".loading-wrapper" ) . visible = true ;
14+ // request the data
15+ var req = new XMLHttpRequest ( ) ;
16+ req . open ( "POST" , url , true ) ;
17+
18+ req . onreadystatechange = function ( ) {
19+ if ( req . readyState == 4 && req . status == 200 ) {
20+ // content is loaded
21+ if ( req . responseText ) {
22+ document . querySelector ( "body" ) . innerHTML = req . responseText ;
23+ document . querySelector ( ".loader-wrapper" ) . visible = false ;
24+ }
25+ }
26+ }
27+ request . send ( vars ) ;
28+ }
You can’t perform that action at this time.
0 commit comments