Ticket #2218: 2218_4.patch
File 2218_4.patch, 2.6 KB (added by , 15 years ago) |
---|
-
_whatsnew.html
120 120 when FCKeditor is installed to a different domain.</li> 121 121 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2066">#2066</a>] Added a workaround for a Mac 122 122 Safari 3.1 browser bug which caused the Fit Window button to give a blank screen.</li> 123 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2218">#2218</a>] Improved Gecko based browser 124 detection to accept Epiphany/Gecko as well.</li> 123 125 </ul> 124 126 <h3> 125 127 Version 2.6</h3> -
editor/_source/internals/fckbrowserinfo.js
28 28 IsIE : /*@cc_on!@*/false, 29 29 IsIE7 : /*@cc_on!@*/false && ( parseInt( s.match( /msie (\d+)/ )[1], 10 ) >= 7 ), 30 30 IsIE6 : /*@cc_on!@*/false && ( parseInt( s.match( /msie (\d+)/ )[1], 10 ) >= 6 ), 31 IsGecko : s.Contains('gecko/'),32 31 IsSafari : s.Contains(' applewebkit/'), // Read "IsWebKit" 33 32 IsOpera : !!window.opera, 34 33 IsAIR : s.Contains(' adobeair/'), … … 38 37 // Completes the browser info with further Gecko information. 39 38 (function( browserInfo ) 40 39 { 40 browserInfo.IsGecko = ( navigator.product == 'Gecko' ) && !browserInfo.IsSafari && !browserInfo.IsOpera ; 41 41 browserInfo.IsGeckoLike = ( browserInfo.IsGecko || browserInfo.IsSafari || browserInfo.IsOpera ) ; 42 42 43 43 if ( browserInfo.IsGecko ) 44 44 { 45 var geckoVersion = s.match( /gecko\/(\d+)/ )[1] ; 45 var geckoMatch = s.match( /rv:(\d+\.\d+)/ ) ; 46 var geckoVersion = geckoMatch && parseFloat( geckoMatch[1] ) ; 46 47 47 48 // Actually "10" refers to Gecko versions before Firefox 1.5, when 48 49 // Gecko 1.8 (build 20051111) has been released. … … 51 52 // than 20051111, so we must also check for the revision number not to 52 53 // be 1.7 (we are assuming that rv < 1.7 will not have build > 20051111). 53 54 54 // TODO: Future versions may consider the rv number only, but it is 55 // still to check that all Gecko based browser present the rv number. 56 browserInfo.IsGecko10 = ( ( geckoVersion < 20051111 ) || ( /rv:1\.7/.test(s) ) ) ; 57 browserInfo.IsGecko19 = /rv:1\.9/.test(s) ; 55 if ( geckoVersion ) 56 { 57 browserInfo.IsGecko10 = ( geckoVersion < 1.8 ) ; 58 browserInfo.IsGecko19 = ( geckoVersion > 1.8 ) ; 59 } 58 60 } 59 else60 browserInfo.IsGecko10 = false ;61 61 })(FCKBrowserInfo) ;