2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08: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:
Dan Ungureanu 2020-04-29 21:40:21 +03:00 committed by GitHub
parent 402194f313
commit c85018cdfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 151 additions and 114 deletions

View file

@ -1,3 +1,12 @@
if (!window.WeakMap || !window.Promise) {
window.unsupportedBrowser = true;
} else {
// Some implementations of `WeakMap.prototype.has` do not accept false
// values and Ember's `isClassicDecorator` sometimes does that (it only
// checks for `null` and `undefined`).
try {
new WeakMap().has(0);
} catch (err) {
window.unsupportedBrowser = true;
}
}