File: browsercheck.js.vi_VN

package info (click to toggle)
jwchat 1.0beta3-3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 6,288 kB
  • ctags: 382
  • sloc: xml: 462; sh: 80; makefile: 6
file content (34 lines) | stat: -rw-r--r-- 1,088 bytes parent folder | download | duplicates (29)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*	BrowserCheck Object
	provides most commonly needed browser checking variables
	19990326
*/
// Copyright (C) 1999 Dan Steinman
// Distributed under the terms of the GNU Library General Public License
// Available at http://www.dansteinman.com/dynapi/

function BrowserCheck() {
	var b = navigator.appName
	if (b=="Netscape") this.b = "ns"
	else if (b=="Microsoft Internet Explorer") this.b = "ie"
	else if (b=="Opera") this.b = "op"
	else this.b = b
	this.v = parseInt(navigator.appVersion)
	this.ns = (this.b=="ns" && this.v>=4)
	this.ns4 = (this.b=="ns" && this.v==4)
	this.ns5 = (this.b=="ns" && this.v==5)
	this.ie = (this.b=="ie" && this.v>=4)
	this.op = (this.b=="op" && this.v>=7)
	this.ie4 = (navigator.userAgent.indexOf('MSIE 4')>0)
	this.ie5 = (navigator.userAgent.indexOf('MSIE 5')>0)
	this.ie55 = (navigator.userAgent.indexOf('MSIE 5.5')>0)
	if (this.ie55) {
		this.v = 5.5;
		this.ie5 = false;
	}
	this.mac = (navigator.userAgent.indexOf('Mac')>0);
	if (this.ie5) this.v = 5
	this.min = (this.ns||this.ie)
}

// automatically create the "is" object
is = new BrowserCheck()