diff --git a/js/background.js b/js/background.js index 6382f37d1..8d45ee3de 100644 --- a/js/background.js +++ b/js/background.js @@ -16,6 +16,13 @@ ;(function() { 'use strict'; + if (chrome && chrome.alarms) { + chrome.alarms.onAlarm.addListener(function() { + // nothing to do. + }); + chrome.alarms.create('awake', {periodInMinutes: 1}); + } + storage.fetch(); storage.onready(function() { var messageReceiver; diff --git a/manifest.json b/manifest.json index af8f0098f..90e98afa6 100644 --- a/manifest.json +++ b/manifest.json @@ -9,7 +9,8 @@ "permissions": [ "unlimitedStorage", "notifications", - "fileSystem" + "fileSystem", + "alarms" ], "icons": {