Commit b34bbad2a7a28923897301e0e220401d2b0b2e15
1 parent
1d5d56b3
Exists in
master
corre??o da tag style, que n?o existe :)
Showing
1 changed file
with
14 additions
and
6 deletions
Show diff stats
barra-brasil.js
| @@ -7,17 +7,25 @@ var divBarra = document.getElementById('barra-brasil'); | @@ -7,17 +7,25 @@ var divBarra = document.getElementById('barra-brasil'); | ||
| 7 | 7 | ||
| 8 | var head = document.getElementsByTagName('head')[0]; | 8 | var head = document.getElementsByTagName('head')[0]; |
| 9 | 9 | ||
| 10 | -var style = document.createElement('style'); | 10 | +var link = document.createElement('link'); |
| 11 | 11 | ||
| 12 | -var src = document.createAttribute("src"); | 12 | +var href = document.createAttribute("href"); |
| 13 | // src.nodeValue = "http://barra.brasil.gov.br/estilo-barra.css"; | 13 | // src.nodeValue = "http://barra.brasil.gov.br/estilo-barra.css"; |
| 14 | - src.nodeValue = "http://189.9.137.173/estilo-barra.css"; | 14 | + href.nodeValue = "http://189.9.137.173/estilo-barra.css"; |
| 15 | 15 | ||
| 16 | var tipo = document.createAttribute("type"); | 16 | var tipo = document.createAttribute("type"); |
| 17 | - tipo.nodeValue = "stylesheet/css"; | 17 | + tipo.nodeValue = "text/css"; |
| 18 | 18 | ||
| 19 | -style.setAttributeNode(src); | ||
| 20 | -style.setAttributeNode(tipo); | 19 | +var rel = document.createAttribute("rel"); |
| 20 | + rel.nodeValue = "stylesheet"; | ||
| 21 | + | ||
| 22 | +var media = document.createAttribute("media"); | ||
| 23 | + media.nodeValue = "all"; | ||
| 24 | + | ||
| 25 | +link.setAttributeNode(href); | ||
| 26 | +link.setAttributeNode(tipo); | ||
| 27 | +link.setAttributeNode(rel); | ||
| 28 | +link.setAttributeNode(media); | ||
| 21 | 29 | ||
| 22 | head.appendChild(style); | 30 | head.appendChild(style); |
| 23 | 31 |