From 001d60bac5af869a0c4692a81ab4829ce6c7db90 Mon Sep 17 00:00:00 2001 From: Dmitriy Novash Date: Tue, 29 Dec 2020 19:13:01 +0200 Subject: [PATCH] Remove popover for mobile --- src/ifm.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ifm.js b/src/ifm.js index 7ef4642..3213662 100644 --- a/src/ifm.js +++ b/src/ifm.js @@ -11,6 +11,9 @@ function IFM(params) { // set the backend for the application self.api = params.api || window.location.href.replace(/#.*/, ""); + // desktop browser not support window.orientation + const ISMOBILE = typeof window.orientation !== 'undefined'; + 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 @@ -133,7 +136,7 @@ function IFM(params) { item.download.action = "download"; item.download.icon = "icon icon-download"; } - if( item.icon.indexOf( 'file-image' ) !== -1 ) { + if ((item.icon.indexOf( 'file-image' ) !== -1) && (ISMOBILE == false)) { item.popover = 'data-toggle="popover"'; } if( self.config.extract && self.inArray( item.ext, ["zip","tar","tgz","tar.gz","tar.xz","tar.bz2"] ) ) {