From c7172efef59c5be2ecc23a9d9312498a24b71f1a Mon Sep 17 00:00:00 2001 From: Augusto Herrmann Date: Wed, 23 Jan 2013 16:37:35 -0200 Subject: [PATCH] Movemos a div com id 'barra-brasil' para o in?cio do elemento body, visando maior compatibilidade com CMSs que dificultam o acesso ao primeiro n?vel do elemento body --- assets/barra-brasil.coffee | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/assets/barra-brasil.coffee b/assets/barra-brasil.coffee index a8fc800..eaf984a 100644 --- a/assets/barra-brasil.coffee +++ b/assets/barra-brasil.coffee @@ -1,7 +1,17 @@ divBarra = document.getElementById("barra-brasil") + divBarra.parentNode.removeChild(divBarra) head = document.getElementsByTagName("head")[0] + body = document.getElementsByTagName("body")[0] + link = document.createElement("link") href = document.createAttribute("href") + + novaDiv = document.createElement("div") + idNovaDiv = document.createAttribute("id") + idNovaDiv.nodeValue = "barra-brasil" + novaDiv.setAttributeNode idNovaDiv + novaDiv.innerHTML = conteudoBarra + body.insertBefore(novaDiv, body.childNodes[0]) # src.nodeValue = "http://barra.brasil.gov.br/estilo-barra.css"; # href.nodeValue = "http://189.9.137.173/estilo-barra.css"; @@ -19,4 +29,3 @@ style.appendChild conteudo head.appendChild style - divBarra.innerHTML = conteudoBarra -- libgit2 0.21.2