mirror of
https://github.com/misterunknown/ifm.git
synced 2025-08-11 10:34:00 +02:00
@@ -966,7 +966,7 @@ function IFM( params ) {
|
||||
self.currentDir = data.realpath;
|
||||
self.refreshFileTable();
|
||||
$( "#currentDir" ).val( self.currentDir );
|
||||
if( config.pushState ) history.pushState( { dir: self.currentDir }, self.currentDir, "#"+self.currentDir );
|
||||
if( config.pushState ) history.pushState( { dir: self.currentDir }, self.currentDir, "#"+encodeURIComponent( self.currentDir ) );
|
||||
},
|
||||
error: function() { self.showMessage( "General error occured: No or broken response", "e" ); }
|
||||
});
|
||||
@@ -1772,7 +1772,8 @@ function IFM( params ) {
|
||||
*/
|
||||
this.historyPopstateHandler = function(event) {
|
||||
var dir = "";
|
||||
if( event.state && event.state.dir ) dir = event.state.dir;
|
||||
if( event.state && event.state.dir )
|
||||
dir = event.state.dir;
|
||||
self.changeDirectory( dir, { pushState: false, absolute: true } );
|
||||
};
|
||||
|
||||
@@ -2048,7 +2049,7 @@ function IFM( params ) {
|
||||
window.onpopstate = self.historyPopstateHandler;
|
||||
// load initial file table
|
||||
if( window.location.hash ) {
|
||||
self.changeDirectory( window.location.hash.substring( 1 ) );
|
||||
self.changeDirectory( decodeURIComponent( window.location.hash.substring( 1 ) ) );
|
||||
} else {
|
||||
this.refreshFileTable();
|
||||
}
|
||||
|
7
ifm.php
7
ifm.php
@@ -966,7 +966,7 @@ function IFM( params ) {
|
||||
self.currentDir = data.realpath;
|
||||
self.refreshFileTable();
|
||||
$( "#currentDir" ).val( self.currentDir );
|
||||
if( config.pushState ) history.pushState( { dir: self.currentDir }, self.currentDir, "#"+self.currentDir );
|
||||
if( config.pushState ) history.pushState( { dir: self.currentDir }, self.currentDir, "#"+encodeURIComponent( self.currentDir ) );
|
||||
},
|
||||
error: function() { self.showMessage( "General error occured: No or broken response", "e" ); }
|
||||
});
|
||||
@@ -1772,7 +1772,8 @@ function IFM( params ) {
|
||||
*/
|
||||
this.historyPopstateHandler = function(event) {
|
||||
var dir = "";
|
||||
if( event.state && event.state.dir ) dir = event.state.dir;
|
||||
if( event.state && event.state.dir )
|
||||
dir = event.state.dir;
|
||||
self.changeDirectory( dir, { pushState: false, absolute: true } );
|
||||
};
|
||||
|
||||
@@ -2048,7 +2049,7 @@ function IFM( params ) {
|
||||
window.onpopstate = self.historyPopstateHandler;
|
||||
// load initial file table
|
||||
if( window.location.hash ) {
|
||||
self.changeDirectory( window.location.hash.substring( 1 ) );
|
||||
self.changeDirectory( decodeURIComponent( window.location.hash.substring( 1 ) ) );
|
||||
} else {
|
||||
this.refreshFileTable();
|
||||
}
|
||||
|
@@ -228,7 +228,7 @@ function IFM( params ) {
|
||||
self.currentDir = data.realpath;
|
||||
self.refreshFileTable();
|
||||
$( "#currentDir" ).val( self.currentDir );
|
||||
if( config.pushState ) history.pushState( { dir: self.currentDir }, self.currentDir, "#"+self.currentDir );
|
||||
if( config.pushState ) history.pushState( { dir: self.currentDir }, self.currentDir, "#"+encodeURIComponent( self.currentDir ) );
|
||||
},
|
||||
error: function() { self.showMessage( "General error occured: No or broken response", "e" ); }
|
||||
});
|
||||
@@ -1034,7 +1034,8 @@ function IFM( params ) {
|
||||
*/
|
||||
this.historyPopstateHandler = function(event) {
|
||||
var dir = "";
|
||||
if( event.state && event.state.dir ) dir = event.state.dir;
|
||||
if( event.state && event.state.dir )
|
||||
dir = event.state.dir;
|
||||
self.changeDirectory( dir, { pushState: false, absolute: true } );
|
||||
};
|
||||
|
||||
@@ -1310,7 +1311,7 @@ function IFM( params ) {
|
||||
window.onpopstate = self.historyPopstateHandler;
|
||||
// load initial file table
|
||||
if( window.location.hash ) {
|
||||
self.changeDirectory( window.location.hash.substring( 1 ) );
|
||||
self.changeDirectory( decodeURIComponent( window.location.hash.substring( 1 ) ) );
|
||||
} else {
|
||||
this.refreshFileTable();
|
||||
}
|
||||
|
Reference in New Issue
Block a user