Skip to content

Instantly share code, notes, and snippets.

@antonydevanchi
Created November 25, 2019 12:39
Show Gist options
  • Select an option

  • Save antonydevanchi/393498078064b4600c695b0ee15140c3 to your computer and use it in GitHub Desktop.

Select an option

Save antonydevanchi/393498078064b4600c695b0ee15140c3 to your computer and use it in GitHub Desktop.
Export all tabs from Toby
chrome.storage.local.get(null, function(items) { // null implies all items
var toby_state = items['state'];
window.URL = window.webkitURL || window.URL;
var blob = new Blob([ toby_state ], {type : "application/json;base64"});
var timestamp = new Date().getTime();
var a = document.createElement('a');
a.href = window.URL.createObjectURL(blob);
a.download = 'toby_export_' + timestamp + '.json';
a.style.display = 'none';
document.body.appendChild(a);
a.click();
delete a;
});
@antonydevanchi
Copy link
Author

Author: Fablo Pedrosa
Source: https://wantoo.io/toby/5210/importexport-tabs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment