summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js3
-rw-r--r--program/js/common.js9
2 files changed, 8 insertions, 4 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 30d870475..3182ce365 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -76,7 +76,8 @@ function rcube_webmail()
this.task = this.env.task;
// check browser
- if (!(bw.dom && ((bw.ie && bw.vendver>=5.5 && !bw.opera) || (bw.mz && bw.vendver>=1) || (bw.safari && bw.vendver>=125) || (bw.opera && bw.vendver>=8))))
+ if (!(bw.dom && ((bw.ie && bw.vendver>=5.5 && !bw.opera) || (bw.mz && bw.vendver>=1) || (bw.safari && bw.vendver>=125) ||
+ (bw.opera && bw.vendver>=8) || (bw.konq && bw.vendver>=3.4))))
{
location.href = this.env.comm_path+'&_action=error&_code=0x199';
return;
diff --git a/program/js/common.js b/program/js/common.js
index 5263a87ab..2d2c2e925 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -47,8 +47,8 @@ function roundcube_browser()
this.ns4 = (this.ns && parseInt(this.ver)==4);
this.ns6 = (this.ns && parseInt(this.vendver)==6); // (this.mz && this.ns) ? true : false;
this.ns7 = (this.ns && parseInt(this.vendver)==7); // this.agent.indexOf('Netscape/7')>0);
- this.safari = this.agent.toLowerCase().indexOf('safari')>0;
- this.konq = (this.agent.toLowerCase().indexOf('konqueror')>0);
+ this.safari = (this.agent.toLowerCase().indexOf('safari')>0 || this.agent.toLowerCase().indexOf('applewebkit')>0);
+ this.konq = (this.agent.toLowerCase().indexOf('konqueror')>0);
this.opera = (window.opera) ? true : false;
this.opera5 = (this.opera5 && this.agent.indexOf('Opera 5')>0) ? true : false;
@@ -58,11 +58,14 @@ function roundcube_browser()
if(this.opera && window.RegExp)
this.vendver = (/opera(\s|\/)([0-9\.]+)/i.test(navigator.userAgent)) ? parseFloat(RegExp.$2) : -1;
else if(!this.vendver && this.safari)
- this.vendver = (/safari\/([0-9]+)/i.test(this.agent)) ? parseInt(RegExp.$1) : 0;
+ this.vendver = (/(safari|applewebkit)\/([0-9]+)/i.test(this.agent)) ? parseInt(RegExp.$2) : 0;
else if((!this.vendver && this.mz) || this.agent.indexOf('Camino')>0)
this.vendver = (/rv:([0-9\.]+)/.test(this.agent)) ? parseFloat(RegExp.$1) : 0;
else if(this.ie && window.RegExp)
this.vendver = (/msie\s+([0-9\.]+)/i.test(this.agent)) ? parseFloat(RegExp.$1) : 0;
+ else if(this.konq && window.RegExp)
+ this.vendver = (/khtml\/([0-9\.]+)/i.test(this.agent)) ? parseFloat(RegExp.$1) : 0;
+
// get real language out of safari's user agent
if(this.safari && (/;\s+([a-z]{2})-[a-z]{2}\)/i.test(this.agent)))