2015-01-08 12:21:53 +07:00
|
|
|
/*jshint ignore:start */
|
2013-06-20 23:15:18 +10:00
|
|
|
|
2015-06-19 12:12:37 +08:00
|
|
|
if ( typeof exports === 'object' ) {
|
|
|
|
module.exports = Squire;
|
2015-07-14 00:16:16 +08:00
|
|
|
} else if ( typeof define === 'function' && define.amd ) {
|
|
|
|
define( function() {
|
|
|
|
return Squire;
|
|
|
|
} );
|
2013-06-20 23:15:18 +10:00
|
|
|
} else {
|
2015-07-06 12:19:21 +07:00
|
|
|
win.Squire = Squire;
|
|
|
|
|
|
|
|
if ( top !== win &&
|
|
|
|
doc.documentElement.getAttribute( 'data-squireinit' ) === 'true' ) {
|
2015-06-19 12:12:37 +08:00
|
|
|
win.editor = new Squire( doc );
|
|
|
|
if ( win.onEditorLoad ) {
|
|
|
|
win.onEditorLoad( win.editor );
|
|
|
|
win.onEditorLoad = null;
|
|
|
|
}
|
2015-05-07 10:52:32 +08:00
|
|
|
}
|
2013-06-20 23:15:18 +10:00
|
|
|
}
|
|
|
|
|
2013-04-08 13:27:06 +10:00
|
|
|
}( document ) );
|