mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-11 09:31:01 +01:00
code review: do not pollute global namespace
This commit is contained in:
parent
e7479dd4be
commit
f362dff643
2 changed files with 3 additions and 2 deletions
|
@ -68,6 +68,7 @@ var renderBlacklists = function() {
|
|||
var listGroupTemplate = uDom('#templates .groupEntry');
|
||||
var listEntryTemplate = uDom('#templates .listEntry');
|
||||
var listStatsTemplate = vAPI.i18n('3pListsOfBlockedHostsPerListStats');
|
||||
var renderElapsedTimeToString = vAPI.i18n.renderElapsedTimeToString;
|
||||
|
||||
// Assemble a pretty blacklist name if possible
|
||||
var listNameFromListKey = function(listKey) {
|
||||
|
@ -129,7 +130,7 @@ var renderBlacklists = function() {
|
|||
if ( asset.cached ) {
|
||||
elem = li.descendants('span.status.purge');
|
||||
elem.css('display', '');
|
||||
elem.attr('title', renderElapsedTime(asset.lastModified));
|
||||
elem.attr('title', renderElapsedTimeToString(asset.lastModified));
|
||||
hasCachedContent = true;
|
||||
}
|
||||
return li;
|
||||
|
|
|
@ -51,7 +51,7 @@ uDom.onLoad(function() {
|
|||
|
||||
/******************************************************************************/
|
||||
|
||||
var renderElapsedTime = function(tstamp) {
|
||||
vAPI.i18n.renderElapsedTimeToString = function(tstamp) {
|
||||
var value = (Date.now() - tstamp) / 60000;
|
||||
if ( value < 2 ) {
|
||||
return vAPI.i18n('elapsedOneMinuteAgo');
|
||||
|
|
Loading…
Reference in a new issue