dynamically list maps avaialble
This commit is contained in:
parent
3246b44a86
commit
cc69d322ca
8 changed files with 70 additions and 52 deletions
|
|
@ -120,8 +120,7 @@ function extractDirectoryListing(doc) {
|
|||
return { files, folders };
|
||||
}
|
||||
|
||||
window.onload = function () {
|
||||
// Example usage
|
||||
function renderDirectory() {
|
||||
const { files, folders } = extractDirectoryListing(window.document);
|
||||
const listDiv = document.querySelector('div.list');
|
||||
|
||||
|
|
@ -201,4 +200,10 @@ window.onload = function () {
|
|||
|
||||
// do the insertion
|
||||
listDiv.parentNode.insertBefore(fileListing, listDiv);
|
||||
}
|
||||
|
||||
window.onload = function () {
|
||||
if (window.location.pathname.includes(usbRoot)) {
|
||||
renderDirectory();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue