Created
May 3, 2020 12:37
-
-
Save arabindadora/c042091c9296cee8567dc723bb914bfe to your computer and use it in GitHub Desktop.
Extract Chrome tabs from Android
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
/** | |
* @author nullv01d | |
* Purpose: Extract Google Chrome tabs from an Android device | |
* Tested on: Google Chrome 81 on Computer | |
* Steps: | |
* 1. Enable USB debugging on your Android device and connect it with the computer | |
* 2. Open Google Chrome on the computer and goto chrome://inspect/#devices | |
* 3. Make sure "Discover USB devices" is enabled | |
* 4. The Android device's name and Chrome tabs' names and links should appear | |
* 5. Open a Chrome DevTools Console and run the code below | |
* 6. Paste the clipboard content to a .html file | |
* 7. Open the .html file in a browser and Viola! | |
*/ | |
let bookmarks = Array.from( | |
document.querySelectorAll("#devices-list .list.pages .subrow") | |
).map((e) => { | |
let title = e.querySelector("div.name").innerText; | |
let url = e.querySelector("div.url").innerText; | |
return `<a href="${url}">${title}</a><br/>`; | |
}); | |
copy("<html><body>" + bookmarks.join("\n") + "</body></html>"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment