mirror of
https://github.com/discourse/discourse.git
synced 2025-03-29 19:25:44 +08:00
FIX: correctly display browser is old message to IE10
We dropped support for IE10 a while back but never amended the banner to show it is not supported. This properly drops support.
This commit is contained in:
parent
12e78d8915
commit
d4bf7d6831
10
vendor/assets/javascripts/browser-update.js.erb
vendored
10
vendor/assets/javascripts/browser-update.js.erb
vendored
@ -11,14 +11,10 @@ var $buo = function() {
|
|||||||
if (navigator && navigator.userAgent) {
|
if (navigator && navigator.userAgent) {
|
||||||
ua = navigator.userAgent;
|
ua = navigator.userAgent;
|
||||||
}
|
}
|
||||||
if (ua && (ua.indexOf('Android 2.2') >= 0 || ua.indexOf('Android 2.3') >= 0)) {
|
|
||||||
// Android 2.2 and 2.3 browsers report that they have pushState, but they don't really.
|
|
||||||
// See http://caniuse.com/#search=pushstate
|
|
||||||
badAndroid = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// sam: my main concern here is mobile, but its an outlier, for now we support ie10, set conditionally and stuff with pushState
|
// sam: we require WeakMap, this allows us to easily feature detect IE10 that does not support it
|
||||||
if (window.ie === "new" || (window.history && window.history.pushState && !badAndroid)) {
|
// This also catches ancient android phones that never had that feature (2.2 and below)
|
||||||
|
if (window.WeakMap) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user