mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 08:09:33 +08:00
Append browser-update div last in the dom to prevent googlebots from seeing it first
This commit is contained in:
parent
9b3740a7c6
commit
a72e7324ba
|
@ -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;}";
|
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
|
// 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);
|
document.getElementsByTagName("head")[0].appendChild(sheet);
|
||||||
try {
|
try {
|
||||||
sheet.innerText = style;
|
sheet.innerText = style;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user