mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-11 17:41:03 +01:00
fine tune tooltips in 3rd-party lists pane
This commit is contained in:
parent
599a8274d7
commit
669be3d45d
3 changed files with 23 additions and 21 deletions
|
@ -51,8 +51,8 @@
|
||||||
--><span class="counts dim"></span>​<!--
|
--><span class="counts dim"></span>​<!--
|
||||||
--><span class="fa status obsolete" title="3pExternalListObsolete"></span>​<!--
|
--><span class="fa status obsolete" title="3pExternalListObsolete"></span>​<!--
|
||||||
--><span class="fa status cache"></span>​<!--
|
--><span class="fa status cache"></span>​<!--
|
||||||
--><span class="fa status updating"></span>​<!--
|
--><span class="fa status updating" title="3pUpdating"></span>​<!--
|
||||||
--><span class="fa status failed"></span>
|
--><span class="fa status failed" title="3pNetworkError"></span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -335,25 +335,21 @@
|
||||||
"message":"One URL per line. Lines prefixed with ‘!’ will be ignored. Invalid URLs will be silently ignored.",
|
"message":"One URL per line. Lines prefixed with ‘!’ will be ignored. Invalid URLs will be silently ignored.",
|
||||||
"description":"English: One URL per line. Lines prefixed with ‘!’ will be ignored. Invalid URLs will be silently ignored."
|
"description":"English: One URL per line. Lines prefixed with ‘!’ will be ignored. Invalid URLs will be silently ignored."
|
||||||
},
|
},
|
||||||
"3pExternalListsApply":{
|
|
||||||
"message":"Parse",
|
|
||||||
"description":"English: Parse"
|
|
||||||
},
|
|
||||||
"3pExternalListPurge":{
|
|
||||||
"message":"purge cache",
|
|
||||||
"description":"English: purge cache"
|
|
||||||
},
|
|
||||||
"3pExternalListNew":{
|
|
||||||
"message":"new version available",
|
|
||||||
"description":"English: new version available"
|
|
||||||
},
|
|
||||||
"3pExternalListObsolete":{
|
"3pExternalListObsolete":{
|
||||||
"message":"out of date",
|
"message":"Out of date.",
|
||||||
"description":"a filter list is 'out of date' (possibly needs to be updated)"
|
"description":"used as a tooltip for the out-of-date icon beside a list"
|
||||||
},
|
},
|
||||||
"3pLastUpdate":{
|
"3pLastUpdate":{
|
||||||
"message":"Last update: {{ago}}",
|
"message":"Last update: {{ago}}.\nClick to force an update.",
|
||||||
"description":"English: Last update: {{ago}}, where 'ago' will be replaced with something like '2 days ago'"
|
"description":"used as a tooltip for the clock icon beside a list"
|
||||||
|
},
|
||||||
|
"3pUpdating":{
|
||||||
|
"message":"Updating...",
|
||||||
|
"description":"used as a tooltip for the spinner icon beside a list"
|
||||||
|
},
|
||||||
|
"3pNetworkError":{
|
||||||
|
"message":"A network error prevented the resource from being updated.",
|
||||||
|
"description":"used as a tooltip for error icon beside a list"
|
||||||
},
|
},
|
||||||
"1pFormatHint":{
|
"1pFormatHint":{
|
||||||
"message":"One filter per line. A filter can be a plain hostname, or an Adblock Plus-compatible filter. Lines prefixed with ‘!’ will be ignored.",
|
"message":"One filter per line. A filter can be a plain hostname, or an Adblock Plus-compatible filter. Lines prefixed with ‘!’ will be ignored.",
|
||||||
|
|
|
@ -43,6 +43,7 @@ var onMessage = function(msg) {
|
||||||
break;
|
break;
|
||||||
case 'assetsUpdated':
|
case 'assetsUpdated':
|
||||||
document.body.classList.remove('updating');
|
document.body.classList.remove('updating');
|
||||||
|
renderWidgets();
|
||||||
break;
|
break;
|
||||||
case 'staticFilteringDataChanged':
|
case 'staticFilteringDataChanged':
|
||||||
renderFilterLists();
|
renderFilterLists();
|
||||||
|
@ -137,12 +138,17 @@ var renderFilterLists = function(soft) {
|
||||||
);
|
);
|
||||||
li.classList.toggle('failed', asset.error !== undefined);
|
li.classList.toggle('failed', asset.error !== undefined);
|
||||||
li.classList.toggle('obsolete', asset.obsolete === true);
|
li.classList.toggle('obsolete', asset.obsolete === true);
|
||||||
li.classList.toggle('cached', asset.cached === true && asset.writeTime > 0);
|
if ( asset.cached === true ) {
|
||||||
if ( asset.cached ) {
|
li.classList.add('cached');
|
||||||
li.querySelector('.status.cache').setAttribute(
|
li.querySelector('.status.cache').setAttribute(
|
||||||
'title',
|
'title',
|
||||||
lastUpdateTemplateString.replace('{{ago}}', renderElapsedTimeToString(asset.writeTime))
|
lastUpdateTemplateString.replace(
|
||||||
|
'{{ago}}',
|
||||||
|
renderElapsedTimeToString(asset.writeTime)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
li.classList.remove('cached');
|
||||||
}
|
}
|
||||||
li.classList.remove('discard');
|
li.classList.remove('discard');
|
||||||
return li;
|
return li;
|
||||||
|
|
Loading…
Reference in a new issue