@@ -100,7 +100,7 @@ $.save = function( commitMessage ) {
|
|||||||
var newLocation = baseUrl;
|
var newLocation = baseUrl;
|
||||||
|
|
||||||
function clean( str ) {
|
function clean( str ) {
|
||||||
return str.replace(/^\/+/g, '/');
|
return str.replace(/^\/+/, '/');
|
||||||
}
|
}
|
||||||
|
|
||||||
// 'a%2Fb' => a/b
|
// 'a%2Fb' => a/b
|
||||||
@@ -344,7 +344,8 @@ var applyTimeout = function () {
|
|||||||
if ( !~location.host.indexOf('github.com') ) {
|
if ( !~location.host.indexOf('github.com') ) {
|
||||||
jQuery.ajax( {
|
jQuery.ajax( {
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: baseUrl + '/data/' + $.key( 'page' ),
|
// ensure leading / is removed from path
|
||||||
|
url: baseUrl + '/data/' + $.key( 'path' ).replace(/^\/+/, '') + $.key( 'page' ),
|
||||||
success: function( data ) {
|
success: function( data ) {
|
||||||
editorSession.setValue( data );
|
editorSession.setValue( data );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user