1075 |
ddelon |
1 |
/*
|
|
|
2 |
* FCKeditor - The text editor for internet
|
|
|
3 |
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
|
|
4 |
*
|
|
|
5 |
* Licensed under the terms of the GNU Lesser General Public License:
|
|
|
6 |
* http://www.opensource.org/licenses/lgpl-license.php
|
|
|
7 |
*
|
|
|
8 |
* For further information visit:
|
|
|
9 |
* http://www.fckeditor.net/
|
|
|
10 |
*
|
|
|
11 |
* "Support Open Source software. What about a donation today?"
|
|
|
12 |
*
|
|
|
13 |
* File Name: fckbrowserinfo.js
|
|
|
14 |
* Contains browser detection information.
|
|
|
15 |
*
|
|
|
16 |
* File Authors:
|
|
|
17 |
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
|
|
18 |
*/
|
|
|
19 |
|
|
|
20 |
var s = navigator.userAgent.toLowerCase() ;
|
|
|
21 |
|
|
|
22 |
var FCKBrowserInfo =
|
|
|
23 |
{
|
|
|
24 |
IsIE : s.Contains('msie'),
|
|
|
25 |
IsIE7 : s.Contains('msie 7'),
|
|
|
26 |
IsGecko : s.Contains('gecko/'),
|
|
|
27 |
IsSafari : s.Contains('safari'),
|
|
|
28 |
IsOpera : s.Contains('opera')
|
|
|
29 |
}
|
|
|
30 |
|
|
|
31 |
FCKBrowserInfo.IsGeckoLike = FCKBrowserInfo.IsGecko || FCKBrowserInfo.IsSafari || FCKBrowserInfo.IsOpera ;
|
|
|
32 |
|
|
|
33 |
if ( FCKBrowserInfo.IsGecko )
|
|
|
34 |
{
|
|
|
35 |
var sGeckoVersion = s.match( /gecko\/(\d+)/ )[1] ;
|
|
|
36 |
FCKBrowserInfo.IsGecko10 = sGeckoVersion < 20051111 ; // Actually "10" refers to versions before Firefox 1.5, where Gecko 20051111 has been released.
|
|
|
37 |
}
|