- Created complete documentation in docs/ directory - Added PROJECT_OVERVIEW.md with feature highlights and getting started guide - Added ARCHITECTURE.md with system design and technical details - Added SECURITY.md with comprehensive security implementation guide - Added DEVELOPMENT.md with development workflows and best practices - Added DEPLOYMENT.md with production deployment instructions - Added API.md with complete REST API documentation - Added CONTRIBUTING.md with contribution guidelines - Added CHANGELOG.md with version history and migration notes - Reorganized all documentation files into docs/ directory for better organization - Updated README.md with proper documentation links and quick navigation - Enhanced project structure with professional documentation standards
45 lines
1.2 KiB
JavaScript
45 lines
1.2 KiB
JavaScript
/*! CSS rel=preload polyfill. Depends on loadCSS function. [c]2016 @scottjehl, Filament Group, Inc. Licensed MIT */
|
|
(function( w ){
|
|
// rel=preload support test
|
|
if( !w.loadCSS ){
|
|
return;
|
|
}
|
|
var rp = loadCSS.relpreload = {};
|
|
rp.support = function(){
|
|
try {
|
|
return w.document.createElement( "link" ).relList.supports( "preload" );
|
|
} catch (e) {
|
|
return false;
|
|
}
|
|
};
|
|
|
|
// loop preload links and fetch using loadCSS
|
|
rp.poly = function(){
|
|
var links = w.document.getElementsByTagName( "link" );
|
|
for( var i = 0; i < links.length; i++ ){
|
|
var link = links[ i ];
|
|
if( link.rel === "preload" && link.getAttribute( "as" ) === "style" ){
|
|
w.loadCSS( link.href, link );
|
|
link.rel = null;
|
|
}
|
|
}
|
|
};
|
|
|
|
// if link[rel=preload] is not supported, we must fetch the CSS manually using loadCSS
|
|
if( !rp.support() ){
|
|
rp.poly();
|
|
var run = w.setInterval( rp.poly, 300 );
|
|
if( w.addEventListener ){
|
|
w.addEventListener( "load", function(){
|
|
rp.poly();
|
|
w.clearInterval( run );
|
|
} );
|
|
}
|
|
if( w.attachEvent ){
|
|
w.attachEvent( "onload", function(){
|
|
w.clearInterval( run );
|
|
} )
|
|
}
|
|
}
|
|
}( this ));
|