zip detection

master
Kit Kasune 3 years ago
parent 3634033ee6
commit 271f17c829
  1. 5
      scripts/fileview/load/render.js

@ -1,4 +1,5 @@
const cp = require('child_process');
const path = require('path');
const loadHierarchy = require("../hierarchy");
const newToast = require('../../toast/createtoast');
@ -16,7 +17,9 @@ module.exports = (dir, options) => {
let cfc = document.createElement("div");
cfc.className = 'file';
if (options.animate) {cfc.classList.add('rise');}
if (file.type.toLowerCase().includes('folder')) {cfc.classList.add('folder');}
if (file.dir) {cfc.classList.add('folder');}
if (!file.dir && path.extname(path.join(window.kade.cpath, file.trueName)) === '.zip') {cfc.classList.add('zip');}
console.log(path.extname(path.join(window.kade.cpath, file.trueName)));
cfc.onclick = function () {
window.kade.elc = true;
if (cfc.classList.contains('file-active')) {

Loading…
Cancel
Save