source: trunk/admin/inc/FCKeditor/editor/_source/internals/fckbrowserinfo.js@ 2

Last change on this file since 2 was 2, checked in by root, 15 years ago

importo il progetto

File size: 1.1 KB
Line 
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
20var s = navigator.userAgent.toLowerCase() ;
21
22var 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
31FCKBrowserInfo.IsGeckoLike = FCKBrowserInfo.IsGecko || FCKBrowserInfo.IsSafari || FCKBrowserInfo.IsOpera ;
32
33if ( 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}
Note: See TracBrowser for help on using the repository browser.