chi zhang 227576b75b new web for monitoring
Change-Id: I7b5dcaee31eefcce62fd37f8121e988428baa9ab
2014-12-24 11:48:05 -08:00

24 lines
688 B
JavaScript

/** `css` is a requirejs plugin
that loads a css file and inject it into a page.
note that this loader will return immediately,
regardless of whether the browser had finished parsing the stylesheet.
this css loader is implemented for file optimization and depedency managment
*/
define({
load: function (name, require, load, config) {
function inject(filename)
{
var head = document.getElementsByTagName('head')[0];
var link = document.createElement('link');
link.href = filename;
link.rel = 'stylesheet';
link.type = 'text/css';
head.appendChild(link);
}
inject(requirejs.toUrl(name));
load(true);
},
pluginBuilder: '../vendor/require/css-build'
});