Last active
September 27, 2021 17:44
-
-
Save lingsamuel/f719b34a2863084639875c1b40168ff1 to your computer and use it in GitHub Desktop.
Backup Chrome synced tabs!
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
// use this in PC-Chrome history page (ctrl+H) | |
var itemList = Array.from(document. | |
getElementById('history-app').shadowRoot.getElementById('synced-devices').shadowRoot. | |
getElementById('synced-device-list').getElementsByTagName('history-synced-device-card')). | |
map(x=>x.shadowRoot.getElementById('tab-item-list')).map(x=>x.getElementsByClassName('website-link')); | |
// if you want to backup only one device, enter a index number here (start from 0) | |
// I suggest you use extension OneTab to manage tabs, so I export OneTab's url format | |
// <url> | <title> | |
// Please notice that google WILL NOT sync all tabs if your have more than ~700+ tabs. | |
var index = 1; | |
var urls = Array.from(itemList[index]).map(x=>`${x.href} | ${x.title}`); | |
var result = urls.join('\n'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment