1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-07 03:12:33 +01:00

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

@ -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', '');