1
0
mirror of https://github.com/misterunknown/ifm.git synced 2025-08-10 10:04:01 +02:00

Fix text file detection, added XML types (like svg). Related to #90

This commit is contained in:
Marco Dickert
2018-02-23 16:14:40 +01:00
parent 97cbfed9fb
commit 55572204a6
3 changed files with 3 additions and 3 deletions

View File

@@ -1565,7 +1565,7 @@ function IFM( params ) {
icon: "icon icon-archive",
title: "extract"
});
} else if( self.config.edit && item.mime_type.substr( 0, 4 ) == "text" ) {
} else if( self.config.edit && ( item.mime_type.substr( 0, 4 ) == "text" || item.mime_type.indexOf( "xml" ) !== false ) ) {
item.eaction = "edit";
item.button.push({
action: "edit",

View File

@@ -1565,7 +1565,7 @@ function IFM( params ) {
icon: "icon icon-archive",
title: "extract"
});
} else if( self.config.edit && item.mime_type.substr( 0, 4 ) == "text" ) {
} else if( self.config.edit && ( item.mime_type.substr( 0, 4 ) == "text" || item.mime_type.indexOf( "xml" ) !== false ) ) {
item.eaction = "edit";
item.button.push({
action: "edit",

View File

@@ -145,7 +145,7 @@ function IFM( params ) {
icon: "icon icon-archive",
title: "extract"
});
} else if( self.config.edit && item.mime_type.substr( 0, 4 ) == "text" ) {
} else if( self.config.edit && ( item.mime_type.substr( 0, 4 ) == "text" || item.mime_type.indexOf( "xml" ) !== false ) ) {
item.eaction = "edit";
item.button.push({
action: "edit",