You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
370 B
12 lines
370 B
3 years ago
|
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;
|
||
|
};
|