@@ -3228,7 +3228,7 @@ var elFinder = function(elm, opts, bootCallback) {
32283228 this . shortcut = function ( s ) {
32293229 var patterns , pattern , code , i , parts ;
32303230
3231- if ( this . options . allowShortcuts && s . pattern && $ . isFunction ( s . callback ) ) {
3231+ if ( this . options . allowShortcuts && s . pattern && typeof s . callback === 'function' ) {
32323232 patterns = s . pattern . toUpperCase ( ) . split ( / \s + / ) ;
32333233
32343234 for ( i = 0 ; i < patterns . length ; i ++ ) {
@@ -5248,10 +5248,10 @@ var elFinder = function(elm, opts, bootCallback) {
52485248 $ . each ( self . commands , function ( name , cmd ) {
52495249 var proto = Object . assign ( { } , cmd . prototype ) ,
52505250 extendsCmd , opts ;
5251- if ( $ . isFunction ( cmd ) && ! self . _commands [ name ] && ( cmd . prototype . forceLoad || $ . inArray ( name , self . options . commands ) !== - 1 ) ) {
5251+ if ( typeof cmd === 'function' && ! self . _commands [ name ] && ( cmd . prototype . forceLoad || $ . inArray ( name , self . options . commands ) !== - 1 ) ) {
52525252 extendsCmd = cmd . prototype . extendsCmd || '' ;
52535253 if ( extendsCmd ) {
5254- if ( $ . isFunction ( self . commands [ extendsCmd ] ) ) {
5254+ if ( typeof self . commands [ extendsCmd ] === 'function' ) {
52555255 cmd . prototype = Object . assign ( { } , base , new self . commands [ extendsCmd ] ( ) , cmd . prototype ) ;
52565256 } else {
52575257 return true ;
@@ -5270,7 +5270,7 @@ var elFinder = function(elm, opts, bootCallback) {
52705270 if ( self . _commands [ name ] . linkedCmds . length ) {
52715271 $ . each ( self . _commands [ name ] . linkedCmds , function ( i , n ) {
52725272 var lcmd = self . commands [ n ] ;
5273- if ( $ . isFunction ( lcmd ) && ! self . _commands [ n ] ) {
5273+ if ( typeof lcmd === 'function' && ! self . _commands [ n ] ) {
52745274 lcmd . prototype = base ;
52755275 self . _commands [ n ] = new lcmd ( ) ;
52765276 self . _commands [ n ] . setup ( n , self . options . commandsOptions [ n ] || { } ) ;
@@ -8611,7 +8611,7 @@ elFinder.prototype = {
86118611
86128612 if ( cnt > 0 ) {
86138613 if ( cancel && button . length ) {
8614- if ( $ . isFunction ( cancel ) || ( typeof cancel === 'object' && cancel . promise ) ) {
8614+ if ( typeof cancel === 'function' || ( typeof cancel === 'object' && cancel . promise ) ) {
86158615 notify . _esc = function ( e ) {
86168616 if ( e . type == 'keydown' && e . keyCode != $ . ui . keyCode . ESCAPE ) {
86178617 return ;
@@ -8768,7 +8768,7 @@ elFinder.prototype = {
87688768 } ;
87698769 }
87708770
8771- if ( opts . optionsCallback && $ . isFunction ( opts . optionsCallback ) ) {
8771+ if ( opts . optionsCallback && typeof opts . optionsCallback === 'function' ) {
87728772 opts . optionsCallback ( options ) ;
87738773 }
87748774
@@ -9262,7 +9262,7 @@ elFinder.prototype = {
92629262 * @return void
92639263 */
92649264 registRawStringDecoder : function ( rawStringDecoder ) {
9265- if ( $ . isFunction ( rawStringDecoder ) ) {
9265+ if ( typeof rawStringDecoder === 'function' ) {
92669266 this . decodeRawString = this . options . rawStringDecoder = rawStringDecoder ;
92679267 }
92689268 } ,
@@ -9754,7 +9754,7 @@ elFinder.prototype = {
97549754 }
97559755 } ) ;
97569756 if ( ! hasError ) {
9757- if ( $ . isFunction ( callback ) ) {
9757+ if ( typeof callback === 'function' ) {
97589758 if ( check ) {
97599759 if ( typeof check . obj [ check . name ] === 'undefined' ) {
97609760 cnt = check . timeout ? ( check . timeout / 10 ) : 1 ;
@@ -9772,7 +9772,7 @@ elFinder.prototype = {
97729772 }
97739773 }
97749774 } else {
9775- if ( opts . error && $ . isFunction ( opts . error ) ) {
9775+ if ( opts . error && typeof opts . error === 'function' ) {
97769776 opts . error ( { loadResults : results } ) ;
97779777 }
97789778 }
0 commit comments