Is it possible to programmatically check if Chrome Sync is configured in Google Chrome?
The reason I ask is that I am coding an Extension for Chrome that depends on
Alternative way to find if service is synced or not:
Get https://www.google.com/settings/chrome/sync?hl=en
with language set to en
, and then:
var is_sync = 0;
NodeList.prototype.forEach = Array.prototype.forEach;
document.querySelectorAll(".Tda.CP").forEach(function(ele){
if(ele.innerHTML == 'Omnibox History')
is_sync = parseInt(ele.parentElement.querySelector('.FP.Uda').innerHTML);
});
Please note that you may want to verify last synchronization date, that is .zU.EP
span, I got something like this:
Last time synced on Wednesday, November 12, 2014 at 1:03:29 PM UTC+1
This is the function I wrote to convert that to time:
last_sync = new Date(document.querySelector('.zU.EP').innerHTML.replace('Last time synced on ','').match(/.*\sat/)[0].replace(' at','')).getTime();
Maybe not the best, but works, and gives an idea.