this fixes #78

This commit is contained in:
gorhill 2015-04-17 10:20:45 -04:00
parent d81146db3c
commit 00a1b90f6b
3 changed files with 31 additions and 13 deletions

View file

@ -44,6 +44,7 @@
<a type="text/plain" target="_blank" href=""></a>
<a href="" style="display: none;" target="_blank"></a>: <!--
--><span class="dim"></span><!--
--><span class="status unsecure" style="display: none;">https</span><!--
--><span class="status new" style="display: none;" data-i18n="3pExternalListNew"></span><!--
--><span class="status obsolete" style="display: none;" data-i18n="3pExternalListObsolete"></span><!--
--><span class="status purge" style="display: none;" data-i18n="3pExternalListPurge"></span>

View file

@ -106,7 +106,7 @@ body[dir=rtl] #buttonApply {
display: none;
}
span.status {
margin: 0 0 0 1em;
margin: 0 0 0 0.5em;
border: 1px solid transparent;
padding: 1px 2px;
display: inline-block;
@ -114,6 +114,13 @@ span.status {
line-height: 1;
opacity: 0.7;
}
span.unsecure {
background-color: #fee;
border-color: #fcc;
color: #f00;
text-decoration: line-through;
text-decoration-style: dotted;
}
span.purge {
border-color: #ddd;
color: #444;

View file

@ -41,19 +41,19 @@ var hasCachedContent = false;
var onMessage = function(msg) {
switch ( msg.what ) {
case 'allFilterListsReloaded':
renderFilterLists();
break;
case 'allFilterListsReloaded':
renderFilterLists();
break;
case 'forceUpdateAssetsProgress':
renderBusyOverlay(true, msg.progress);
if ( msg.done ) {
messager.send({ what: 'reloadAllFilters' });
}
break;
case 'forceUpdateAssetsProgress':
renderBusyOverlay(true, msg.progress);
if ( msg.done ) {
messager.send({ what: 'reloadAllFilters' });
}
break;
default:
break;
default:
break;
}
};
@ -115,10 +115,20 @@ var renderFilterLists = function() {
.replace('{{total}}', !isNaN(+entry.entryCount) ? renderNumber(entry.entryCount) : '?');
elem.text(text);
// https://github.com/gorhill/uBlock/issues/78
// Badge for non-secure connection
var remoteURL = listKey;
if ( remoteURL.lastIndexOf('http:', 0) !== 0 ) {
remoteURL = entry.homeURL || '';
}
if ( remoteURL.lastIndexOf('http:', 0) === 0 ) {
li.descendants('span.status.unsecure').css('display', '');
}
// https://github.com/chrisaljoudi/uBlock/issues/104
var asset = listDetails.cache[listKey] || {};
// Update status
// Badge for update status
if ( entry.off !== true ) {
if ( asset.repoObsolete ) {
li.descendants('span.status.new').css('display', '');