kopia lustrzana https://github.com/OpenDroneMap/WebODM
Add isMobile function
rodzic
6f5d68d6ed
commit
a44c2ce86f
|
@ -103,6 +103,10 @@ export default {
|
|||
var sizes = ['bytes', 'Kb', 'Mb', 'Gb', 'Tb', 'Pb', 'Eb', 'Zb', 'Yb'];
|
||||
var i = Math.floor(Math.log(bytes) / Math.log(k));
|
||||
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
|
||||
},
|
||||
|
||||
isMobile: function(){
|
||||
return navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(android)|(webOS)/i);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue