mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Improve support for old browsers (#9515)
* FEATURE: Improve crawler view
* FIX: Make lazyYT crawler-friendly
* DEV: Rename discourse-internet-explorer to discourse-unsupported-browser
* DEV: Detect more unsupported browsers
Follow-up to 4eebbd2212.
* FIX: Hide browser update notice in print view
This commit is contained in:
@@ -18,6 +18,7 @@ var $buo = function() {
|
||||
return;
|
||||
}
|
||||
|
||||
document.getElementsByTagName('body')[0].classList.add("crawler");
|
||||
var mainElement = document.getElementById("main");
|
||||
var noscriptElements = document.getElementsByTagName("noscript");
|
||||
// noscriptElements[0].innerHTML contains encoded HTML
|
||||
@@ -34,7 +35,7 @@ var $buo = function() {
|
||||
|
||||
// create the notification div stylesheet
|
||||
var sheet = document.createElement("style");
|
||||
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;} @media print { .buorg { display: none !important; } }";
|
||||
|
||||
// insert the div and stylesheet into the DOM
|
||||
document.body.appendChild(div); // put it last in the DOM so Googlebot doesn't include it in search excerpts
|
||||
|
||||
Reference in New Issue
Block a user