This commit is contained in:
bootstraponline
2012-08-30 11:09:44 -03:00
parent 7ae4acbdb0
commit d0dd23fc11
@@ -342,10 +342,15 @@ var applyTimeout = function () {
~-1 == false; !~-1 == true;
*/
if ( !~location.host.indexOf('github.com') ) {
// ensure leading / is removed from path and that it ends with /
var path = unescape($.key( 'path' )).replace(/^\/+/, '');
if ( path.charAt( path.length - 1 ) !== '/' ) {
path += '/';
}
jQuery.ajax( {
type: 'GET',
// ensure leading / is removed from path
url: baseUrl + '/data/' + $.key( 'path' ).replace(/^\/+/, '') + $.key( 'page' ),
url: baseUrl + '/data/' + path + $.key( 'page' ),
success: function( data ) {
editorSession.setValue( data );
}