X-Git-Url: https://git.wh0rd.org/?p=chrome-ext%2Fclearhistory-advance-fork.git;a=blobdiff_plain;f=javascript%2Fclearhistory.js;h=28eb2b060676ec161b554e177389f5316b24885a;hp=f614fff5e9844130d6ba4d74e0f3c9323f3dc4c6;hb=016d65473cf14e5153a497bd043cd6e1b62d860c;hpb=c8fabbc84cc9550e8d8218a05fa38f4f36600bc5 diff --git a/javascript/clearhistory.js b/javascript/clearhistory.js index f614fff..28eb2b0 100644 --- a/javascript/clearhistory.js +++ b/javascript/clearhistory.js @@ -67,10 +67,10 @@ function clearDownloads(s) { function didClearHistory(s) { var time = ~~(s.time) || CONSTANTS.DEFAULT_TIME; time = getUnitsForTime(time); - var timeString = (time.time === -1) ? - chrome.i18n.getMessage('notificationTimeAll') : - chrome.i18n.getMessage('notificationTime', - [time.time, time.units]); + var timeMsg = (time.time === -1) ? 'notificationTimeAll' : + (s.timeStart === CONSTANTS.YES) ? 'notificationTimeNewer' : + 'notificationTimeOlder'; + var timeString = chrome.i18n.getMessage(timeMsg, [time.time, time.units]); var message = chrome.i18n.getMessage('notificationBody', timeString); var notification = webkitNotifications.createNotification( chrome.extension.getURL('/images/icon48.png'),