j3nda/speed-dial-chrome — pull request #9 by heavensrevenge (2013-11-06 11:46:51+00:00)
Title: Merged with your changes, fixed a few more bugs, and got the chrome.sync API all ready to go

OK, have a gander and see my merge with your defaultfolder changes you made the other day, hopefully you will like the sync and enjoy how fun i is to see sync across rooms or browser sessions etc :P

BTW here are the two versions of thumbnail support I have gotten working:

/// v1 working
//chrome.tabs.onUpdated.addListener(function (tabId, changeInfo, tab) {
//	if (tab.selected && tab.status == "complete") {
//	chrome.runtime.sendMessage({name: "capture"}, function(response) {
//	console.log(tab.url);
//	console.log(response.response);
//	//localStorage.setItem(c.url, response.response)
//	});
//	}
//});
//
//chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) {
//	if (request.name == "capture") {
//	chrome.tabs.captureVisibleTab( null, {format:"jpeg", quality:12}, function(dataUrl) {
//	setTimeout(function () {sendResponse({response:dataUrl});}, 1000);
//	});
//	return true;
//	}
//});

// v2 working
//chrome.tabs.onUpdated.addListener(function (tabId, changeInfo, tab) {
//	if (tab.selected && tab.status == "complete") {
//	chrome.tabs.captureVisibleTab( null, {format:"jpeg", quality:12}, function(dataUrl) {
//	setTimeout(function () {
//	console.log(tab.url);
//	console.log(dataUrl);
//	//localStorage.setItem(tab.url, dataUrl)
//	}, 1000);
//	});
//	}
//});

Thing is, we need an event handling page to be alive after we click through a dial, since in our case the speed dial process dies as soon as we navigate away from the dial so even timeouts or anything wont fire.
So having sync support as step 1 to thumbnails I think is an OK 1st step right? :)