Skip to content

Instantly share code, notes, and snippets.

@satour
Created September 6, 2019 08:18
Show Gist options
  • Save satour/819e87ce5dc21622bf2adec7dca9427c to your computer and use it in GitHub Desktop.
Save satour/819e87ce5dc21622bf2adec7dca9427c to your computer and use it in GitHub Desktop.
var dbcsv = '\"Name\",\"URL\", \"Owner\", \"Size\", \"Tables\", \"Records\", \"Last Imported\", \"Permission\"\n';
document.querySelectorAll('.ReactVirtualized__Table__row').forEach(function(element) {
let name = element.firstChild.firstChild.firstChild.title;
let url = element.firstChild.firstChild.firstChild.href;
let owner = element.firstChild.firstChild.childNodes[1].firstElementChild.innerText;
let size = element.firstChild.firstChild.childNodes[1].childNodes[1].innerText;
let tables = element.childNodes[1].innerText;
let records = element.childNodes[2].innerText;
let li = element.childNodes[3].innerText;
let per = element.childNodes[4].innerText;
dbcsv = dbcsv + '\"' + name + '\",\"' + url + '\",\"' + owner + '\",\"' + size + '\",\"' + tables + '\",\"' + records + '\",\"' + li + '\",\"' + per + '\"\n';
});
console.log(dbcsv);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment