Skip to content

24/3/2019 - Exporting Android Chrome Tabs #3

@planetastro

Description

@planetastro

https://github.com/lmmx/devnotes/wiki/Export-all-Chrome-tabs-on-Android
Can't get the code to work anymore as it seems Google changed the structure. This works:

tabs = document.querySelector('#-blink-dev-tools > div.widget.vbox.root-view > div > div > div > div:nth-child(1) > div > div').shadowRoot.querySelectorAll('div > div.hbox.devices-container > div.flex-auto.vbox > div > div.device-browser-list.vbox > div > div.device-page-list.vbox.device-view-more-toggled > .vbox')
str = '';
for (i=0;i<tabs.length;i++){
if (tabs[i].querySelector('.device-page-url .devtools-link') != null){
str += '- ['+tabs[i].querySelector('.device-page-title').textContent + '](' + tabs[i].querySelector('.device-page-url .devtools-link').getAttribute('href') +')\n'
} else {
console.log(tabs[i])
}
}
copy(str)

Just the top part. Your code is brilliant, thanks lots for it!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions