X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fcore%2Fenv.js;h=61df9093023796bf7d40dfe606bd562bc6f82b6c;hb=refs%2Ftags%2Fv3.6.2;hp=dab70d9a572dda54c0f0bccafbb07616ef372ce0;hpb=4e90e78dc97789709ee7404359a5517540c27553;p=ckeditor.git diff --git a/_source/core/env.js b/_source/core/env.js index dab70d9..61df909 100644 --- a/_source/core/env.js +++ b/_source/core/env.js @@ -86,6 +86,15 @@ if ( !CKEDITOR.env ) mobile : ( agent.indexOf( 'mobile' ) > -1 ), /** + * Indicates that CKEditor is running on Apple iPhone/iPad/iPod devices. + * @type Boolean + * @example + * if ( CKEDITOR.env.iOS ) + * alert( "I like little apples!" ); + */ + iOS : /(ipad|iphone|ipod)/.test(agent), + + /** * Indicates that the browser has a custom domain enabled. This has * been set with "document.domain". * @returns {Boolean} "true" if a custom domain is enabled. @@ -103,7 +112,16 @@ if ( !CKEDITOR.env ) return domain != hostname && domain != ( '[' + hostname + ']' ); // IPv6 IP support (#5434) - } + }, + + /** + * Indicates that page is running under an encrypted connection. + * @returns {Boolean} "true" if the page has an encrypted connection. + * @example + * if ( CKEDITOR.env.secure ) + * alert( "I'm in SSL!" ); + */ + secure : location.protocol == 'https:' }; /** @@ -230,7 +248,12 @@ if ( !CKEDITOR.env ) * alert( "Your browser is pretty cool!" ); */ env.isCompatible = + + // White list of mobile devices that supports. + env.iOS && version >= 534 || + !env.mobile && ( + ( env.ie && version >= 6 ) || ( env.gecko && version >= 10801 ) || ( env.opera && version >= 9.5 ) ||