optimize for google pagespeed insights

git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3479 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
adametz 2018-12-04 17:46:00 +00:00
parent a2a93aab0e
commit 7ad52c8b89
145 changed files with 105899 additions and 4408 deletions

29
trunk/web/js/onloadCSS.js Executable file
View file

@ -0,0 +1,29 @@
/*! onloadCSS. (onload callback for loadCSS) [c]2017 Filament Group, Inc. MIT License */
/* global navigator */
/* exported onloadCSS */
function onloadCSS( ss, callback ) {
var called;
function newcb(){
if( !called && callback ){
called = true;
callback.call( ss );
}
}
if( ss.addEventListener ){
ss.addEventListener( "load", newcb );
}
if( ss.attachEvent ){
ss.attachEvent( "onload", newcb );
}
// This code is for browsers that dont support onload
// No support for onload (it'll bind but never fire):
// * Android 4.3 (Samsung Galaxy S4, Browserstack)
// * Android 4.2 Browser (Samsung Galaxy SIII Mini GT-I8200L)
// * Android 2.3 (Pantech Burst P9070)
// Weak inference targets Android < 4.4
if( "isApplicationInstalled" in navigator && "onloadcssdefined" in ss ) {
ss.onloadcssdefined( newcb );
}
}