folder selection util

master
Kit Kasune 3 years ago
parent e480605934
commit 1d8e370914
  1. 12
      scripts/fileview/selectfolder.js

@ -0,0 +1,12 @@
module.exports = (name) => {
let folders = document.getElementById('files').getElementsByClassName('folder');
let folder = 1;
for (let i = 0; i < folders.length; i++) {
if (folders.item(i).children.item(1).innerHTML === name) {
folder = folders.item(i);
folder.click();
break;
}
}
return folder;
};
Loading…
Cancel
Save