Previously it used document.createStyleSheet for IE (which appears to be the only browser that supports it) or @import for everything else
* to ensure that client-side caches do not keep obsolete copies of global
* styles.
*/
-$wgStyleVersion = '228';
+$wgStyleVersion = '229';
# Server-side caching:
return importStylesheetURI(wgScript + '?action=raw&ctype=text/css&title=' + encodeURIComponent(page.replace(/ /g,'_')));
}
-function importStylesheetURI(url) {
- return document.createStyleSheet ? document.createStyleSheet(url) : appendCSS('@import "' + url + '";');
+function importStylesheetURI(url,media) {
+ var l = document.createElement('link');
+ l.type = 'text/css';
+ l.rel = 'stylesheet';
+ l.href = url;
+ if(media) l.media = media
+ document.getElementsByTagName('head')[0].appendChild(l);
+ return l;
}
function appendCSS(text) {