diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c4a2f00 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.jshintrc +*.swp diff --git a/background.js b/background.js index 78108ff..ad48312 100644 --- a/background.js +++ b/background.js @@ -1,8 +1,8 @@ -browser.idle.onStateChanged.addListener(function(state) { +browser.idle.onStateChanged.addListener((state) => { if (state == 'idle') { - browser.storage.local.get('days', function(res) { + browser.storage.local.get('days').then((res) => { var days = res.days || 0; - if (days != 0) { + if (days !== 0) { var end = new Date(); end.setHours(0); end.setMinutes(0); diff --git a/manifest.json b/manifest.json index c570dfe..b22cfc9 100644 --- a/manifest.json +++ b/manifest.json @@ -3,6 +3,11 @@ "name": "History Cleaner", "version": "1.1", "description": "Deletes history older than a specified amount of days.", + "applications": { + "gecko": { + "id": "{a138007c-5ff6-4d10-83d9-0afaf0efbe5e}" + } + }, "icons": { "48": "icons/icon-48.png", "96": "icons/icon-96.png" diff --git a/options.js b/options.js index 7e0fd63..645b339 100644 --- a/options.js +++ b/options.js @@ -3,7 +3,7 @@ function saveOptions(e) { e.preventDefault(); } function restoreOptions() { - browser.storage.local.get('days', function(res) { + browser.storage.local.get('days').then((res) => { document.querySelector("#days").value = res.days || 0; }); }