Created
March 20, 2022 10:38
-
-
Save benjaminaaron/98055bdd2ab0b83ca173b7609227f884 to your computer and use it in GitHub Desktop.
JS code for the chrome developer console to extract a CSV file from "Tabs from other devices" in chrome://history/syncedTabs
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
// To access the list-element within shadowroot I clicked inspect on the list and right-clicked on <div id="tab-item-list"> | |
// --> "Store as global variable", this gives you temp1 that is the basis for this cript | |
// There are probably better ways to access elements in shadowroot, but I didn't want to take the time to learn about it at this point :) | |
items = temp1.getElementsByClassName("item-container") | |
for (i = 0; i < items.length; i++) { | |
item = items[i].firstChild; | |
line = '"' + item.title.replace(/['"]+/g, '') + '","' + item.href + '"'; | |
setTimeout (console.log.bind (console, line)); | |
} | |
// And then right-click in the console and "Save as...", remove the for-loop code on top of the file and rename it to CSV |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment