Improve iPad/iPhone detection

Some devices do not set iPhone/Ipad string in User-Agent, so we
have to check also navigator.platform.
pull/5917/merge
Aleksander Machniak 7 years ago
parent 92d6673bb5
commit d76f255c3b

@ -72,8 +72,8 @@ function roundcube_browser()
this.safari = !this.chrome && !this.opera && (this.webkit || this.agent_lc.indexOf('safari') > 0);
this.konq = this.agent_lc.indexOf('konqueror') > 0;
this.mz = this.dom && !this.chrome && !this.safari && !this.konq && !this.opera && this.agent.indexOf('Mozilla') >= 0;
this.iphone = this.safari && (this.agent_lc.indexOf('iphone') > 0 || this.agent_lc.indexOf('ipod') > 0);
this.ipad = this.safari && this.agent_lc.indexOf('ipad') > 0;
this.iphone = this.safari && (this.agent_lc.indexOf('iphone') > 0 || this.agent_lc.indexOf('ipod') > 0 || this.platform == 'ipod' || this.platform == 'iphone');
this.ipad = this.safari && (this.agent_lc.indexOf('ipad') > 0 || this.platform == 'ipad');
}
if (!this.vendver) {

Loading…
Cancel
Save