Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
planetastro opened this issue Mar 23, 2019 · 3 comments
Closed

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

planetastro opened this issue Mar 23, 2019 · 3 comments

Comments

@planetastro
Copy link

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!

@miracle2k
Copy link

I think this is because Chrome no longer supports /deep/

@Immortalin
Copy link

Immortalin commented May 9, 2019

@planetastro this can be closed now. See new updated script.

@lmmx
Copy link
Owner

lmmx commented Nov 29, 2019

Cool, thanks for the update everyone! @Immortalin I'll add a link to your updated script (I actually switched to Firefox on Android since writing it for Chrome so am not using it myself), glad it's useful for you 👍

@lmmx lmmx closed this as completed Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants