]> git.wh0rd.org - chrome-ext/clearhistory-advance-fork.git/blobdiff - javascript/options.js
add an option to automatically purge history
[chrome-ext/clearhistory-advance-fork.git] / javascript / options.js
index 17139d59e576a283115724d70f99b41135b1ac96..f6dfcadec4533dfb4ef075ea94761270ee991bc3 100644 (file)
@@ -32,6 +32,7 @@ function init() {
   $('#optionsTimeFor')[0].innerText = chrome.i18n.getMessage('optionsTimeFor');
   $('#optionsTimeStart')[0].innerText = chrome.i18n.getMessage('optionsTimeStart');
   $('#optionsCookies')[0].innerText = chrome.i18n.getMessage('optionsCookies');
+  $('#optionsAutoclear')[0].innerText = chrome.i18n.getMessage('optionsAutoclear');
   $('#optionsSaved > b')[0].innerText = chrome.i18n.getMessage('optionsSaved');
 
   // Bind all the callbacks
@@ -52,11 +53,13 @@ function init() {
   var showPrompt = localStorage['prompt'] ||
                    (localStorage['prompt'] = CONSTANTS.YES);
   var clearCookies = localStorage['cookies'] || CONSTANTS.NO;
+  var autoClear = localStorage['autoclear'] || CONSTANTS.NO;
 
   $('input[name=timeStart]')[0].checked = (timeStart === CONSTANTS.YES);
   $('input[name=time][value="' + time + '"]')[0].checked = true;
   $('input[name=prompt]')[0].checked = (showPrompt === CONSTANTS.YES);
   $('input[name=cookies]')[0].checked = (clearCookies === CONSTANTS.YES);
+  $('input[name=autoclear]')[0].checked = (autoClear === CONSTANTS.YES);
 }
 
 /**