X-Git-Url: https://git.wh0rd.org/?p=chrome-ext%2Fclearhistory-advance-fork.git;a=blobdiff_plain;f=javascript%2Foptions.js;h=f40b46ce5b0872aec1a2364a9688df926e80d103;hp=94ea31eb9da15c656258146c9604d41bdaf51d85;hb=c8fabbc84cc9550e8d8218a05fa38f4f36600bc5;hpb=03eef92c55cf1da39e0151aaeb5aa756c243246f diff --git a/javascript/options.js b/javascript/options.js index 94ea31e..f40b46c 100644 --- a/javascript/options.js +++ b/javascript/options.js @@ -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'); + $('#optionsDownloads')[0].innerText = chrome.i18n.getMessage('optionsDownloads'); $('#optionsAutoclear')[0].innerText = chrome.i18n.getMessage('optionsAutoclear'); $('#optionsSaved > b')[0].innerText = chrome.i18n.getMessage('optionsSaved'); @@ -45,19 +46,21 @@ function init() { // Load or set localStorage data var settings = [ - 'timeStart', 'time', 'prompt', 'cookies', 'autoclear', + 'timeStart', 'time', 'prompt', 'cookies', 'downloads', 'autoclear', ]; chrome.storage.sync.get(settings, function(s) { var timeStart = s.timeStart || CONSTANTS.YES; var time = ~~(s.time) || (s.time = CONSTANTS.DEFAULT_TIME); var showPrompt = s.prompt || (s.prompt = CONSTANTS.YES); var clearCookies = s.cookies || CONSTANTS.NO; + var clearDownloads = s.downloads || CONSTANTS.NO; var autoClear = s.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=downloads]')[0].checked = (clearDownloads === CONSTANTS.YES); $('input[name=autoclear]')[0].checked = (autoClear === CONSTANTS.YES); }); }