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

Recompile after last merge

Signed-off-by: Marco Dickert <marco@misterunknown.de>
This commit is contained in:
Marco Dickert
2020-01-06 12:01:35 +01:00
parent 9c647cca11
commit 9ddb1c969a
2 changed files with 16 additions and 4 deletions

View File

@@ -1652,8 +1652,14 @@ function IFM( params ) {
onClick: function( data ) { onClick: function( data ) {
if( data.clicked.link.toLowerCase().substr(0,4) == "http" ) if( data.clicked.link.toLowerCase().substr(0,4) == "http" )
self.copyToClipboard( data.clicked.link ); self.copyToClipboard( data.clicked.link );
else else {
self.copyToClipboard( self.pathCombine( window.location.origin, data.clicked.link ) ); var pathname = window.location.pathname.replace( /^\/*/g, '' ).split( '/' );
pathname.pop();
var link = self.pathCombine( window.location.origin, data.clicked.link )
if( pathname.length > 0 )
link = self.pathCombine( window.location.origin, pathname.join( '/' ), data.clicked.link )
self.copyToClipboard( link );
}
}, },
iconClass: "icon icon-link-ext", iconClass: "icon icon-link-ext",
isShown: function( data ) { return !!( !data.selected.length && data.clicked.name != ".." ); } isShown: function( data ) { return !!( !data.selected.length && data.clicked.name != ".." ); }

10
ifm.php
View File

@@ -1652,8 +1652,14 @@ function IFM( params ) {
onClick: function( data ) { onClick: function( data ) {
if( data.clicked.link.toLowerCase().substr(0,4) == "http" ) if( data.clicked.link.toLowerCase().substr(0,4) == "http" )
self.copyToClipboard( data.clicked.link ); self.copyToClipboard( data.clicked.link );
else else {
self.copyToClipboard( self.pathCombine( window.location.origin, data.clicked.link ) ); var pathname = window.location.pathname.replace( /^\/*/g, '' ).split( '/' );
pathname.pop();
var link = self.pathCombine( window.location.origin, data.clicked.link )
if( pathname.length > 0 )
link = self.pathCombine( window.location.origin, pathname.join( '/' ), data.clicked.link )
self.copyToClipboard( link );
}
}, },
iconClass: "icon icon-link-ext", iconClass: "icon icon-link-ext",
isShown: function( data ) { return !!( !data.selected.length && data.clicked.name != ".." ); } isShown: function( data ) { return !!( !data.selected.length && data.clicked.name != ".." ); }