Append browser-update div last in the dom to prevent googlebots from seeing it first

This commit is contained in:
Neil Lalonde 2014-02-06 10:47:59 -05:00
parent 9b3740a7c6
commit a72e7324ba

View File

@ -40,7 +40,7 @@ var $buo = function() {
var style = ".buorg {position:absolute; z-index:111111; width:100%; top:0px; left:0px; background:#FDF2AB; text-align:left; font-family: sans-serif; color:#000; font-size: 14px;} .buorg div {padding: 8px;} .buorg a, .buorg a:visited {color:#E25600; text-decoration: underline;}";
// insert the div and stylesheet into the DOM
document.body.insertBefore(div, document.body.firstChild);
document.body.appendChild(div); // put it last in the DOM so Googlebot doesn't include it in search excerpts
document.getElementsByTagName("head")[0].appendChild(sheet);
try {
sheet.innerText = style;