+ function update_sitecss(text) {
+ if (!text)
+ text = $('#user_css').val();
+
+ // IE 8 doesn't let us update the innerHTML of <style> tags (with jQuery.text())
+ // see: http://stackoverflow.com/questions/2692770/style-style-textcss-appendtohead-does-not-work-in-ie/2692861#2692861
+ $("style#sitecss").remove();
+ $("<style id='sitecss' type='text/css' media='all'>" + text + "</style>").appendTo('head');
+ }
+
+ update_sitecss();