Data url now includes path.
This commit is contained in:
bootstraponline
2012-08-30 11:03:11 -03:00
parent 881590ab37
commit 7ae4acbdb0
@@ -100,7 +100,7 @@ $.save = function( commitMessage ) {
var newLocation = baseUrl;
function clean( str ) {
return str.replace(/^\/+/g, '/');
return str.replace(/^\/+/, '/');
}
// 'a%2Fb' => a/b
@@ -344,7 +344,8 @@ var applyTimeout = function () {
if ( !~location.host.indexOf('github.com') ) {
jQuery.ajax( {
type: 'GET',
url: baseUrl + '/data/' + $.key( 'page' ),
// ensure leading / is removed from path
url: baseUrl + '/data/' + $.key( 'path' ).replace(/^\/+/, '') + $.key( 'page' ),
success: function( data ) {
editorSession.setValue( data );
}