includes/clientside/jsres.php
changeset 1053 bdbb49cf6f1b
parent 1046 cfc6c30c5e2d
child 1056 f21d6e75b469
equal deleted inserted replaced
1052:374d08d176cb 1053:bdbb49cf6f1b
   195       $apex = filemtime("includes/clientside/static/$js_file");
   195       $apex = filemtime("includes/clientside/static/$js_file");
   196       
   196       
   197       $file_contents = file_get_contents("includes/clientside/static/$js_file");
   197       $file_contents = file_get_contents("includes/clientside/static/$js_file");
   198       $everything .= jsres_cache_check($js_file, $file_contents) . ' loaded_components[\'' . $js_file . '\'] = true;';
   198       $everything .= jsres_cache_check($js_file, $file_contents) . ' loaded_components[\'' . $js_file . '\'] = true;';
   199     }
   199     }
   200     $everything .= 'if ( onload_complete ) { console.debug("running hooks from jsres"); runOnloadHooks(); onload_hooks = []; };';
   200     $everything .= 'if ( onload_complete ) { runOnloadHooks(); onload_hooks = []; };';
   201   }
   201   }
   202   else
   202   else
   203   {
   203   {
   204     if ( !preg_match('/^[a-z0-9_-]+\.js$/i', $js_file) )
   204     if ( !preg_match('/^[a-z0-9_-]+\.js$/i', $js_file) )
   205     {
   205     {
   208     }
   208     }
   209     
   209     
   210     $apex = filemtime("includes/clientside/static/$js_file");
   210     $apex = filemtime("includes/clientside/static/$js_file");
   211     
   211     
   212     $file_contents = file_get_contents("includes/clientside/static/$js_file");
   212     $file_contents = file_get_contents("includes/clientside/static/$js_file");
   213     $everything = jsres_cache_check($js_file, $file_contents) . ' loaded_components[\'' . $js_file . '\'] = true; if ( onload_complete ) { console.debug("running hooks from jsres"); runOnloadHooks(); onload_hooks = []; };';
   213     $everything = jsres_cache_check($js_file, $file_contents) . ' loaded_components[\'' . $js_file . '\'] = true; if ( onload_complete ) { runOnloadHooks(); onload_hooks = []; };';
   214   }
   214   }
   215 }
   215 }
   216 else
   216 else
   217 {
   217 {
   218   // compress enano-lib-basic
   218   // compress enano-lib-basic