Created
June 1, 2023 19:08
-
-
Save potch/985d77070df4e008172e92d4311af145 to your computer and use it in GitHub Desktop.
Web console snippet for capturing launchdarkly flag info out of the UI as a CSV
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
((s = (e, l) => e.querySelector(l)) => | |
Array.from(document.querySelectorAll('[data-test-id="table-body"] tr')) | |
.map((e) => | |
[ | |
s(e, '[data-test-id="copy-code-button"]').innerText, | |
s(e, "a").href, | |
s(e, '[headers="FlagListTable-variation"]>div>span:last-child') | |
.innerText, | |
s( | |
e, | |
'[headers="FlagListTable-variation"]>div:last-child>span:last-child>span time' | |
).getAttribute("dateTime"), | |
].join(",") | |
) | |
.join("\n"))(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment