Skip to content

Instantly share code, notes, and snippets.

@garywill
Created May 14, 2022 12:06
Show Gist options
  • Save garywill/720c27b82f64906d7ceef9d0dc239eb4 to your computer and use it in GitHub Desktop.
Save garywill/720c27b82f64906d7ceef9d0dc239eb4 to your computer and use it in GitHub Desktop.
In iCloud folder view webpage, get currently seen files filenames
var divs = Array.from(
document.querySelectorAll("html.firefox.gecko body div ui-main-pane div.cw-pane-container div div.drive-ui.root.underlay-pane div.tab-content.mouse-style div.navigation div.container div.cw-collection-view.grid.files.cw-list-view.cw-ui-collections-collection-view div div.cw-list-item-view.cw-ui-collections-list-item-view")
);
for (var i=0; i<divs.length; i++) {
var span = divs[i].querySelector("div.body div.title-container div.link.cw-button span.title");
console.log(span.textContent);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment