Skip to content

Commit

Permalink
Append browser-update div last in the dom to prevent googlebots from …
Browse files Browse the repository at this point in the history
…seeing it first
  • Loading branch information
nlalonde committed Feb 6, 2014
1 parent 9b3740a commit a72e732
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vendor/assets/javascripts/browser-update.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a72e732

Please sign in to comment.