not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
575 B

  1. // HACK: Force settings to empty the first time - need for Sugar web convergence
  2. if (typeof chrome != 'undefined' && chrome.app && chrome.app.runtime) {
  3. chrome.storage.local.get('sugar_settings', function(value) {
  4. if (!value.sugar_settings) {
  5. chrome.storage.local.set({sugar_settings:JSON.stringify({})});
  6. }
  7. });
  8. } else if (typeof(Storage)!=="undefined" && typeof(window.localStorage)!=="undefined") {
  9. try {
  10. if (window.localStorage.getItem('sugar_settings') === null) {
  11. window.localStorage.setItem('sugar_settings', JSON.stringify({}));
  12. }
  13. } catch (err) {}
  14. }