]> git.wh0rd.org - chrome-ext/clearhistory-advance-fork.git/blobdiff - javascript/background.js
popup: move prompt from background page to popup page
[chrome-ext/clearhistory-advance-fork.git] / javascript / background.js
index 1a00748bf163281e5f061411caba3f7b7c0990ed..77069e8cf506e32bf00125d7dc645fd4b2a549a8 100644 (file)
@@ -5,13 +5,13 @@
  * @author arunjit@google.com (Arunjit Singh)
  */
 
-var CONSTANTS = {
+export const CONSTANTS = {
   /**
    * The available time ranges (in hours). -1 => eternity.
    * @type {Array.<number>}
    * @const
    */
-  TIMES: [-1, 1, 2, 24, 168],
+  TIMES: [-1, 1, 2, 24, 168, 336, 720],
   /**
    * The default time (in hours)
    * @type {number}
@@ -29,14 +29,7 @@ var CONSTANTS = {
    * @type {string}
    * @const
    */
-  NO: 'no'
-};
+  NO: 'no',
 
-/**
- * Go to the options page on first run
- */
-if (!localStorage['options-set']) {
-  var optionsPageURL = chrome.extension.getURL('/views/options.html');
-  chrome.tabs.create({url: optionsPageURL});
-  localStorage['options-set'] = 1;
-}
+  CLEANER_ALARM: 'auto-cleaner'
+};