mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-01 00:29:39 +02:00
fixed "raced condition" between two onLoad listener
This commit is contained in:
parent
f98e256760
commit
8c75b8b0dd
@ -36,7 +36,7 @@ ul > li {
|
|||||||
<p id="3pListsOfBlockedHostsPrompt2"></p>
|
<p id="3pListsOfBlockedHostsPrompt2"></p>
|
||||||
<ul id="blacklistTemplate" style="display:none">
|
<ul id="blacklistTemplate" style="display:none">
|
||||||
<li class="blacklistDetails"><input type="checkbox"> <a href="" type="text/plain"></a>:
|
<li class="blacklistDetails"><input type="checkbox"> <a href="" type="text/plain"></a>:
|
||||||
<span class="dim" data-i18n="3pListsOfBlockedHostsPerListStats"></span>
|
<span class="dim"></span>
|
||||||
</ul>
|
</ul>
|
||||||
<ul id="blacklists" style="margin:0.5em 0 0 0;padding-left:1em;list-style-type:none">
|
<ul id="blacklists" style="margin:0.5em 0 0 0;padding-left:1em;list-style-type:none">
|
||||||
<li style="margin-top:0.75em"><input type="checkbox" id="parseAllABPHideFilters"><span data-i18n="3pParseAllABPHideFiltersPrompt1"></span>
|
<li style="margin-top:0.75em"><input type="checkbox" id="parseAllABPHideFilters"><span data-i18n="3pParseAllABPHideFiltersPrompt1"></span>
|
||||||
|
@ -134,7 +134,7 @@ function renderBlacklists() {
|
|||||||
child.attr('href', encodeURI(blacklistHref));
|
child.attr('href', encodeURI(blacklistHref));
|
||||||
child.html(prettifyListName(blacklist.title, blacklistHref));
|
child.html(prettifyListName(blacklist.title, blacklistHref));
|
||||||
child = $('span', li);
|
child = $('span', li);
|
||||||
text = child.text()
|
text = chrome.i18n.getMessage('3pListsOfBlockedHostsPerListStats')
|
||||||
.replace('{{used}}', !blacklist.off && !isNaN(+blacklist.entryUsedCount) ? renderNumber(blacklist.entryUsedCount) : '0')
|
.replace('{{used}}', !blacklist.off && !isNaN(+blacklist.entryUsedCount) ? renderNumber(blacklist.entryUsedCount) : '0')
|
||||||
.replace('{{total}}', !isNaN(+blacklist.entryCount) ? renderNumber(blacklist.entryCount) : '?')
|
.replace('{{total}}', !isNaN(+blacklist.entryCount) ? renderNumber(blacklist.entryCount) : '?')
|
||||||
;
|
;
|
||||||
@ -220,7 +220,7 @@ function abpHideFiltersCheckboxChanged() {
|
|||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
$(function() {
|
window.addEventListener('load', function() {
|
||||||
// Handle user interaction
|
// Handle user interaction
|
||||||
$('#blacklists').on('change', '.blacklistDetails', selectedBlacklistsChanged);
|
$('#blacklists').on('change', '.blacklistDetails', selectedBlacklistsChanged);
|
||||||
$('#blacklistsApply').on('click', blacklistsApplyHandler);
|
$('#blacklistsApply').on('click', blacklistsApplyHandler);
|
||||||
|
Loading…
Reference in New Issue
Block a user