Hacker News new | past | comments | ask | show | jobs | submit login

It's a huge leap forward in browser management. Not exactly a replacement for headless browsing/scraping etc, but for personal use, nothing compares. A big contribution to the "personal data management" toolbox.

In the realm of tab management, I use this one liner in console of chrome://inspect every once in a while, then just close all of my tabs:

  collection = document.getElementById("pages").getElementsByClassName("subrow"); final_output_tsv = "title\turl\n"; for (let item of collection) {final_output_tsv += `${item.children[0].innerHTML}\t${item.children[1] ? item.children[1].innerHTML : "N/A"}\n`}; copy(final_output_tsv)
Substitute "devices" for "pages" to get android chrome tabs

This way I can backup all my tabs in simple, non-bookmark format and search them using python etc.




cool this seems handy, but when I try my chrome://inspect/#pages only contains a small subset of tabs out of the few dozen windows I have open. Any tips?


Looks like only recently opened tabs (or some variation on that) show up here. To test, reload all tabs In one window (I used an extension) and check out chrome://inspect again. It's all there. Maybe there's a good reason for not showing all pages in inspect. Who knows. Another problem is that my script grabs page subprocess urls also. I've mainly used this for grabbing my android tabs.

This is an adapted version that skips grabbing subprocesses

  collection = document.getElementById("pages").getElementsByClassName("subrow"); final_output_tsv = "title\turl\n"; for (let item of collection) {if(new RegExp("([a-zA-Z0-9]+://)?([a-zA-Z0-9_]+:[a-zA-Z0-9_]+@)?([a-zA-Z0-9.-]+\\.[A-Za-z]{2,4})(:[0-9]+)?(/.*)?").test(item.children[0].innerHTML) === false) final_output_tsv += `${item.children[0].innerHTML}\t${item.children[1] ? item.children[1].innerHTML : "N/A"}\n`}; copy(final_output_tsv)
edit: I used reload all tabs extension with reload all tabs in all windows option turned on. This could get messy.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: