Use inline style

rel-1.0
Vitaliy Filippov 2016-03-21 21:52:18 +03:00
parent ff2a393331
commit f4936c622f
1 changed files with 9 additions and 1 deletions

10
util.js
View File

@ -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);
};