diff --git a/src/ifm.js b/src/ifm.js index dc90995..e51460e 100644 --- a/src/ifm.js +++ b/src/ifm.js @@ -5,15 +5,8 @@ function IFM( params ) { var self = this; // reference to ourself, because "this" does not work within callbacks // set the backend for the application - if( ! params.api ) { - throw new Error( "IFM: no backend configured" ); - } else { - self.api = params.api; - } + self.api = params.api || window.location.pathname; - - - this.isDocroot = ; this.editor = null; // global ace editor this.fileChanged = false; // flag for check if file was changed already this.currentDir = ""; // this is the global variable for the current directory; it is used for AJAX requests @@ -93,7 +86,7 @@ function IFM( params ) { newRow += '>