From a72e7324baf1055c50e808cec05f0d4abf711c6b Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Thu, 6 Feb 2014 10:47:59 -0500 Subject: [PATCH] Append browser-update div last in the dom to prevent googlebots from seeing it first --- vendor/assets/javascripts/browser-update.js.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/assets/javascripts/browser-update.js.erb b/vendor/assets/javascripts/browser-update.js.erb index 6a27df4c9..ef9d05b31 100644 --- a/vendor/assets/javascripts/browser-update.js.erb +++ b/vendor/assets/javascripts/browser-update.js.erb @@ -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;