1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-06 19:02:30 +01:00

fine tune tooltips in 3rd-party lists pane

This commit is contained in:
gorhill 2017-04-26 12:21:01 -04:00
parent 599a8274d7
commit 669be3d45d
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
3 changed files with 23 additions and 21 deletions

View File

@ -51,8 +51,8 @@
--><span class="counts dim"></span>&#8203;<!--
--><span class="fa status obsolete" title="3pExternalListObsolete">&#xf071;</span>&#8203;<!--
--><span class="fa status cache">&#xf017;</span>&#8203;<!--
--><span class="fa status updating">&#xf110;</span>&#8203;<!--
--><span class="fa status failed">&#xf06a;</span>
--><span class="fa status updating" title="3pUpdating">&#xf110;</span>&#8203;<!--
--><span class="fa status failed" title="3pNetworkError">&#xf127;</span>
</li>
</ul>
</div>

View File

@ -335,25 +335,21 @@
"message":"One URL per line. Lines prefixed with &lsquo;!&rsquo; will be ignored. Invalid URLs will be silently ignored.",
"description":"English: One URL per line. Lines prefixed with &lsquo;!&rsquo; 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":{
"message":"out of date",
"description":"a filter list is 'out of date' (possibly needs to be updated)"
"message":"Out of date.",
"description":"used as a tooltip for the out-of-date icon beside a list"
},
"3pLastUpdate":{
"message":"Last update: {{ago}}",
"description":"English: Last update: {{ago}}, where 'ago' will be replaced with something like '2 days ago'"
"message":"Last update: {{ago}}.\nClick to force an update.",
"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":{
"message":"One filter per line. A filter can be a plain hostname, or an Adblock Plus-compatible filter. Lines prefixed with &lsquo;!&rsquo; will be ignored.",

View File

@ -43,6 +43,7 @@ var onMessage = function(msg) {
break;
case 'assetsUpdated':
document.body.classList.remove('updating');
renderWidgets();
break;
case 'staticFilteringDataChanged':
renderFilterLists();
@ -137,12 +138,17 @@ var renderFilterLists = function(soft) {
);
li.classList.toggle('failed', asset.error !== undefined);
li.classList.toggle('obsolete', asset.obsolete === true);
li.classList.toggle('cached', asset.cached === true && asset.writeTime > 0);
if ( asset.cached ) {
if ( asset.cached === true ) {
li.classList.add('cached');
li.querySelector('.status.cache').setAttribute(
'title',
lastUpdateTemplateString.replace('{{ago}}', renderElapsedTimeToString(asset.writeTime))
lastUpdateTemplateString.replace(
'{{ago}}',
renderElapsedTimeToString(asset.writeTime)
)
);
} else {
li.classList.remove('cached');
}
li.classList.remove('discard');
return li;