1ml_state = false; 2ml_ready = false; 3var ml_timeout; 4var ml_timeout2; 5 6function materialLoading(state){ 7 if(state && ml_ready){ 8 document.getElementById('materialLoading').className = 'show'; 9 clearTimeout(ml_timeout); 10 clearTimeout(ml_timeout2); 11 ml_timeout2=setTimeout(function(){ 12 13 if( 14 !!fleetInfo && 15 !socket.connected 16 ) { 17 snackbar("Connecting, one moment...", 5000 ); 18 19 ml_timeout=setTimeout(function(){ 20 window.location.href = window.location.href; 21 location.reload(); 22 }, 5000); 23 } 24 },15000); 25 26 27 28 } 29 else if(ml_ready){ 30 clearTimeout(ml_timeout); 31 clearTimeout(ml_timeout2); 32 document.getElementById('materialLoading').className = 'hide'; 33 } 34 ml_state = state; 35} 36window.addEventListener('load', function(){ 37 console.log('material-loading.js v1.2') 38 var ml = document.createElement('div'); 39 ml.id = 'materialLoading'; 40 ml.className = 'hide'; 41 var mlCentered = document.createElement('div'); 42 mlCentered.id = 'materialLoadingCentered' 43 var mlContent = document.createElement('div'); 44 mlContent.id = 'materialLoadingContent'; 45 mlContent.innerHTML = '<div class="mdl-spinner mdl-spinner--single-color mdl-js-spinner is-active"></div>'; 46 mlCentered.appendChild(mlContent); 47 ml.appendChild(mlCentered); 48 document.body.appendChild(ml); 49 ml_ready = true; 50 materialLoading(ml_state); 51 if ( componentHandler){ 52 componentHandler.upgradeDom(); 53 } 54})
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.