Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
|
|
@ -0,0 +1,5 @@
|
|||
;'use strict';(function(exports){var STORE_NAME='ice_contacts';var store=null;var status='not_initialized';var FIELD='ICE_CONTACTS';function init(){if(store!==null){return Promise.resolve(store);}
|
||||
if(!navigator.getDataStores){return Promise.reject('No DS supported');}
|
||||
if(status==='initialising'){document.addEventListener('ice_ready',function ready(){document.removeEventListener('ice_ready',ready);if(store===null){return Promise.reject('Error getting store');}else{return Promise.resolve(store);}});}
|
||||
status='initialising';return new Promise(function(resolve,reject){navigator.getDataStores(STORE_NAME).then(function(stores){if(!stores||stores.length<0){document.dispatchEvent(new Event('on_ice_ready'));return reject('No DS found');}else{store=stores[0];status='initialised';document.dispatchEvent(new Event('ice_ready'));return resolve(store);}});});}
|
||||
var ICEStore={setContacts:function(iceContacts){return init().then(function(){return store.put(iceContacts,FIELD).then(function(){return Promise.resolve(iceContacts);});});},getContacts:function(){return init().then(function(){return store.get(FIELD);});},onChange:function(cb){return init().then(function(){store.addEventListener('change',function(){store.get(FIELD).then(cb);});});}};exports.ICEStore=ICEStore;})(window);
|
||||
Loading…
Reference in a new issue