JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.6.2
[ckeditor.git] / ckeditor_source.js
index 54be74a..b5dd4e2 100644 (file)
@@ -5,7 +5,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 \r
 // Compressed version of core/ckeditor_base.js. See original for instructions.\r
 /*jsl:ignore*/\r
-if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'',version:'3.6.1',revision:'7072',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f<e.length;f++){var g=e[f].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(g){d=g[1];break;}}}if(d.indexOf(':/')==-1)if(d.indexOf('/')===0)d=location.href.match(/^.*?:\/\/[^\/]*/)[0]+d;else d=location.href.match(/^[^\?]*\/(?:)/)[0]+d;return d;})(),getUrl:function(d){if(d.indexOf(':/')==-1&&d.indexOf('/')!==0)d=this.basePath+d;if(this.timestamp&&d.charAt(d.length-1)!='/')d+=(d.indexOf('?')>=0?'&':'?')+('t=')+this.timestamp;return d;}},b=window.CKEDITOR_GETURL;if(b){var c=a.getUrl;a.getUrl=function(d){return b.call(a,d)||c.call(a,d);};}return a;})();\r
+if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'',version:'3.6.2',revision:'7275',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f<e.length;f++){var g=e[f].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(g){d=g[1];break;}}}if(d.indexOf(':/')==-1)if(d.indexOf('/')===0)d=location.href.match(/^.*?:\/\/[^\/]*/)[0]+d;else d=location.href.match(/^[^\?]*\/(?:)/)[0]+d;return d;})(),getUrl:function(d){if(d.indexOf(':/')==-1&&d.indexOf('/')!==0)d=this.basePath+d;if(this.timestamp&&d.charAt(d.length-1)!='/')d+=(d.indexOf('?')>=0?'&':'?')+('t=')+this.timestamp;return d;}},b=window.CKEDITOR_GETURL;if(b){var c=a.getUrl;a.getUrl=function(d){return b.call(a,d)||c.call(a,d);};}return a;})();\r
 /*jsl:end*/\r
 \r
 // Uncomment the following line to have a new timestamp generated for each\r
@@ -20,6 +20,16 @@ else
        CKEDITOR._autoLoad = 'core/ckeditor';\r
 \r
        // Include the loader script.\r
-       document.write(\r
-               '<script type="text/javascript" src="' + CKEDITOR.getUrl( '_source/core/loader.js' ) + '"></script>' );\r
+       if ( document.body && (!document.readyState || document.readyState == 'complete') )\r
+       {\r
+               var script = document.createElement( 'script' );\r
+               script.type = 'text/javascript';\r
+               script.src = CKEDITOR.getUrl( '_source/core/loader.js' );\r
+               document.body.appendChild( script );\r
+       }\r
+       else\r
+       {\r
+               document.write(\r
+                       '<script type="text/javascript" src="' + CKEDITOR.getUrl( '_source/core/loader.js' ) + '"></script>' );\r
+       }\r
 }\r