X-Git-Url: https://scm.cri.ensmp.fr/git/ckeditor.git/blobdiff_plain/e11f66eb655db8339a2d9b197b89f6c3b26099e1..579f65bc95a773bc6f8da75f6849ea49f365368b:/skins/ckeditor/_samples/sample.js diff --git a/skins/ckeditor/_samples/sample.js b/skins/ckeditor/_samples/sample.js deleted file mode 100644 index 9e0b411..0000000 --- a/skins/ckeditor/_samples/sample.js +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -// This file is not required by CKEditor and may be safely ignored. -// It is just a helper file that displays a red message about browser compatibility -// at the top of the samples (if incompatible browser is detected). - -if ( window.CKEDITOR ) -{ - (function() - { - var showCompatibilityMsg = function() - { - var env = CKEDITOR.env; - - var html = '

Your browser is not compatible with CKEditor.'; - - var browsers = - { - gecko : 'Firefox 2.0', - ie : 'Internet Explorer 6.0', - opera : 'Opera 9.5', - webkit : 'Safari 3.0' - }; - - var alsoBrowsers = ''; - - for ( var key in env ) - { - if ( browsers[ key ] ) - { - if ( env[key] ) - html += ' CKEditor is compatible with ' + browsers[ key ] + ' or higher.'; - else - alsoBrowsers += browsers[ key ] + '+, '; - } - } - - alsoBrowsers = alsoBrowsers.replace( /\+,([^,]+), $/, '+ and $1' ); - - html += ' It is also compatible with ' + alsoBrowsers + '.'; - - html += '

With non compatible browsers, you should still be able to see and edit the contents (HTML) in a plain text field.

'; - - var alertsEl = document.getElementById( 'alerts' ); - alertsEl && ( alertsEl.innerHTML = html ); - }; - - var onload = function() - { - // Show a friendly compatibility message as soon as the page is loaded, - // for those browsers that are not compatible with CKEditor. - if ( !CKEDITOR.env.isCompatible ) - showCompatibilityMsg(); - }; - - // Register the onload listener. - if ( window.addEventListener ) - window.addEventListener( 'load', onload, false ); - else if ( window.attachEvent ) - window.attachEvent( 'onload', onload ); - })(); -}