diff --git a/util.js b/util.js index e3ac6b3..04cdcdf 100644 --- a/util.js +++ b/util.js @@ -332,7 +332,7 @@ window.curStyle = function(e) return window.getComputedStyle ? getComputedStyle(e) : e.currentStyle; }; -window.addCSS = function(url) +window.addStylesheet = function(url) { var s = document.createElement('link'); s.setAttribute('rel', 'stylesheet'); @@ -340,3 +340,11 @@ window.addCSS = function(url) s.setAttribute('href', url); document.getElementsByTagName('head')[0].appendChild(s); }; + +window.addCSS = function(css) +{ + var s = document.createElement('style'); + s.setAttribute('type', 'text/css'); + s.innerHTML = css; + document.getElementsByTagName('head')[0].appendChild(s); +};