Skip to content

Commit

Permalink
Recompiled ckeditor_base with Closure Compiler.
Browse files Browse the repository at this point in the history
  • Loading branch information
fredck authored and Garry Yao committed Apr 17, 2012
1 parent 4423ff8 commit 66f1f52
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 92 deletions.
147 changes: 57 additions & 90 deletions ckeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,102 +5,69 @@ For licensing, see LICENSE.html or http://ckeditor.com/license

// Compressed version of core/ckeditor_base.js. See original for instructions.
/*jsl:ignore*/
if ( !window.CKEDITOR ) {
window.CKEDITOR = (function() {
var b = {
timestamp: "", version: "%VERSION%", revision: "%REV%", _: { pending: [] },
status: "unloaded", basePath: (function() {
var g = window.CKEDITOR_BASEPATH || "";
if ( !g ) {
var d = document.getElementsByTagName( "script" );
for ( var f = 0; f < d.length; f++ ) {
var e = d[ f ].src.match( /(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i );
if ( e ) {
g = e[ 1 ];
break
}
}
}
if ( g.indexOf( ":/" ) == -1 ) {
if ( g.indexOf( "/" ) === 0 ) {
g = location.href.match( /^.*?:\/\/[^\/]*/ )[ 0 ] + g
} else {
g = location.href.match( /^[^\?]*\/(?:)/ )[ 0 ] + g
}
}
if ( !g ) {
throw 'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.'
}
return g
})(), getUrl: function( d ) {
if ( d.indexOf( ":/" ) == -1 && d.indexOf( "/" ) !== 0 ) {
d = this.basePath + d
}
if ( this.timestamp && d.charAt( d.length - 1 ) != "/" && !( /[&?]t=/ ).test( d ) ) {
d += ( d.indexOf( "?" ) >= 0 ? "&" : "?" ) + "t=" + this.timestamp
window.CKEDITOR || ( window.CKEDITOR = function() {
var e = {
timestamp: "", version: "%VERSION%", revision: "%REV%", _: { pending: [] },
status: "unloaded", basePath: function() {
var a = window.CKEDITOR_BASEPATH || ""; if ( !a )
for ( var c = document.getElementsByTagName( "script" ), b = 0; b < c.length; b++ ) {
var d = c[ b ].src.match( /(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i );
if ( d ) {
a = d[ 1 ];
break
}
return d
},
domReady: (function() {
var d = [];

function e() {
} - 1 == a.indexOf( ":/" ) && ( a = 0 === a.indexOf( "/" ) ? location.href.match( /^.*?:\/\/[^\/]*/ )[ 0 ] + a : location.href.match( /^[^\?]*\/(?:)/ )[ 0 ] + a );
if ( !a )
throw 'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';
return a
}(), getUrl: function( a ) {
-1 == a.indexOf( ":/" ) && 0 !== a.indexOf( "/" ) && ( a = this.basePath + a );
this.timestamp && "/" != a.charAt( a.length - 1 ) && !/[&?]t=/.test( a ) && ( a += ( 0 <= a.indexOf( "?" ) ? "&" : "?" ) + "t=" + this.timestamp );
return a
},
domReady: function() {
function a() {
try {
document.addEventListener ? document.removeEventListener( "DOMContentLoaded", a, !1 ) : document.attachEvent && document.detachEvent( "onreadystatechange", a )
} catch ( b ) {}
for ( var d; d = c.shift(); )
d()
}
var c = [];
return function( b ) {
c.push( b );
"complete" === document.readyState && setTimeout( a, 1 );
if ( 1 == c.length )
if ( document.addEventListener )
document.addEventListener( "DOMContentLoaded", a, !1 ), window.addEventListener( "load", a, !1 );
else if ( document.attachEvent ) {
document.attachEvent( "onreadystatechange", a );
window.attachEvent( "onload", a );
b = !1;
try {
if ( document.addEventListener ) {
document.removeEventListener( "DOMContentLoaded", e, false )
} else {
if ( document.attachEvent ) {
document.detachEvent( "onreadystatechange", e )
}
b = null == window.frameElement
} catch ( d ) {}
document.documentElement.doScroll && b &&
function g() {
try {
document.documentElement.doScroll( "left" )
} catch ( b ) {
setTimeout( g, 1 );
return
}
} catch ( g ) {}
var f;
while ( f = d.shift() ) {
f()
}
a()
}()
}
return function( g ) {
d.push( g );
if ( document.readyState === "complete" ) {
setTimeout( e, 1 )
}
if ( d.length != 1 ) {
return
}
if ( document.addEventListener ) {
document.addEventListener( "DOMContentLoaded", e, false );
window.addEventListener( "load", e, false )
} else {
if ( document.attachEvent ) {
document.attachEvent( "onreadystatechange", e );
window.attachEvent( "onload", e );
var f = false;
try {
f = window.frameElement == null
} catch ( h ) {}
if ( document.documentElement.doScroll && f ) {
(function i() {
try {
document.documentElement.doScroll( "left" )
} catch ( j ) {
setTimeout( i, 1 );
return
}
e()
})()
}
}
}
}
})() }; var a = window.CKEDITOR_GETURL; if ( a ) {
var c = b.url;
b.url = function( d ) {
return a.call( b, d ) || c.call( b, d )
}
}() },
f = window.CKEDITOR_GETURL; if ( f ) {
var h = e.url;
e.url = function( a ) {
return f.call( e, a ) || h.call( e, a )
}
return b
})()
};
}
return e
}() );
/*jsl:end*/

if ( CKEDITOR.loader )
Expand Down
6 changes: 4 additions & 2 deletions core/ckeditor_base.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
// Must be updated on changes in the script as well as updated in the
// ckeditor_source.js and ckeditor_basic_source.js files.

// if(!window.CKEDITOR)window.CKEDITOR=function(){var b={timestamp:"",version:"%VERSION%",revision:"%REV%",_:{pending:[]},status:"unloaded",basePath:function(){var a=window.CKEDITOR_BASEPATH||"";if(!a)for(var d=document.getElementsByTagName("script"),c=0;c<d.length;c++){var e=d[c].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(e){a=e[1];break}}if(a.indexOf(":/")==-1)a=a.indexOf("/")===0?location.href.match(/^.*?:\/\/[^\/]*/)[0]+a:location.href.match(/^[^\?]*\/(?:)/)[0]+a;if(!a)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';
// return a}(),getUrl:function(a){if(a.indexOf(":/")==-1&&a.indexOf("/")!==0)a=this.basePath+a;if(this.timestamp&&a.charAt(a.length-1)!="/"&&!/[&?]t=/.test(a))a+=(a.indexOf("?")>=0?"&":"?")+"t="+this.timestamp;return a}},f=window.CKEDITOR_GETURL;if(f){var g=b.url;b.url=function(a){return f.call(b,a)||g.call(b,a)}}return b}();
//window.CKEDITOR||(window.CKEDITOR=function(){var e={timestamp:"",version:"%VERSION%",revision:"%REV%",_:{pending:[]},status:"unloaded",basePath:function(){var a=window.CKEDITOR_BASEPATH||"";if(!a)for(var c=document.getElementsByTagName("script"),b=0;b<c.length;b++){var d=c[b].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(d){a=d[1];break}}-1==a.indexOf(":/")&&(a=0===a.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+a:location.href.match(/^[^\?]*\/(?:)/)[0]+a);if(!a)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.'; return a}(),getUrl:function(a){-1==a.indexOf(":/")&&0!==a.indexOf("/")&&(a=this.basePath+a);this.timestamp&&"/"!=a.charAt(a.length-1)&&!/[&?]t=/.test(a)&&(a+=(0<=a.indexOf("?")?"&":"?")+"t="+this.timestamp);return a},domReady:function(){function a(){try{document.addEventListener?document.removeEventListener("DOMContentLoaded",a,!1):document.attachEvent&&document.detachEvent("onreadystatechange",a)}catch(b){}for(var d;d=c.shift();)d()}var c=[];return function(b){c.push(b);"complete"===document.readyState&& setTimeout(a,1);if(1==c.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",a,!1),window.addEventListener("load",a,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",a);window.attachEvent("onload",a);b=!1;try{b=null==window.frameElement}catch(d){}document.documentElement.doScroll&&b&&function g(){try{document.documentElement.doScroll("left")}catch(b){setTimeout(g,1);return}a()}()}}}()},f=window.CKEDITOR_GETURL;if(f){var h=e.url;e.url=function(a){return f.call(e, a)||h.call(e,a)}}return e}());

// The Closure Compiler online service should be used when updating this manually:
// http://closure-compiler.appspot.com/

// #### Raw code
// ATTENTION: read the above "Compressed Code" notes when changing this code.
Expand Down

0 comments on commit 66f1f52

Please sign in to comment.