registration.js 656 B

12345678910111213141516171819202122
  1. /*
  2. * vim: ts=4:sw=4:expandtab
  3. */
  4. (function () {
  5. 'use strict';
  6. Whisper.Registration = {
  7. markDone: function () {
  8. storage.put('chromiumRegistrationDoneEver', '');
  9. storage.put('chromiumRegistrationDone', '');
  10. },
  11. isDone: function () {
  12. return storage.get('chromiumRegistrationDone') === '';
  13. },
  14. everDone: function() {
  15. return storage.get('chromiumRegistrationDoneEver') === '' ||
  16. storage.get('chromiumRegistrationDone') === '';
  17. },
  18. remove: function() {
  19. storage.remove('chromiumRegistrationDone');
  20. }
  21. };
  22. }());