Option to enable HTML-Filter by default improved (#33)
This commit is contained in:
parent
05a1e30ab4
commit
7a576059d8
|
@ -165,6 +165,7 @@
|
|||
<div class="html-filter-section">
|
||||
<section class="option">
|
||||
<div id="html-filter-domains-title-exclude" class="title-option without-checkbox" data-i18n-content="htmlFilterDomainsTitleExclude">Do not apply HTML-Filter to these domains:</div>
|
||||
<div id="html-filter-domains-title-include" class="title-option without-checkbox" data-i18n-content="htmlFilterDomainsTitleInclude">Apply HTML-Filter for these domains:</div>
|
||||
<input class="input-text without-checkbox" data-option="domainsManipulateDOM" type="text">
|
||||
<div class="description-option without-checkbox" data-i18n-content="htmlFilterDomainsDescription">Enter domains for HTML filter. Separate multiple entries with semi-colons (;).</div>
|
||||
</section>
|
||||
|
|
|
@ -72,6 +72,14 @@ options._renderOptionsPanel = function () {
|
|||
options._renderLocaleNotice();
|
||||
}
|
||||
|
||||
if(elements.negateHtmlFilterList.checked === true) {
|
||||
document.getElementById('html-filter-domains-title-include').style.display = "none";
|
||||
document.getElementById('html-filter-domains-title-exclude').style.display = "block";
|
||||
} else {
|
||||
document.getElementById('html-filter-domains-title-include').style.display = "block";
|
||||
document.getElementById('html-filter-domains-title-exclude').style.display = "none";
|
||||
}
|
||||
|
||||
document.getElementById('last-mapping-update').textContent += ' ' + lastMappingUpdate;
|
||||
document.getElementById('negate-html-filter-list-warning').addEventListener('click', options._onClickHTMLFilterWarning);
|
||||
};
|
||||
|
@ -252,6 +260,16 @@ options._onOptionChanged = function ({target}) {
|
|||
optionValue = options._parseDomainWhitelist(optionValue);
|
||||
}
|
||||
|
||||
if (optionKey === Setting.NEGATE_HTML_FILTER_LIST) {
|
||||
if(optionValue === true) {
|
||||
document.getElementById('html-filter-domains-title-include').style.display = "none";
|
||||
document.getElementById('html-filter-domains-title-exclude').style.display = "block";
|
||||
} else {
|
||||
document.getElementById('html-filter-domains-title-include').style.display = "block";
|
||||
document.getElementById('html-filter-domains-title-exclude').style.display = "none";
|
||||
}
|
||||
}
|
||||
|
||||
chrome.storage.sync.set({
|
||||
[optionKey]: optionValue
|
||||
});
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
<li>Added: libphonenumber-js v1.7.53 (reported by email)</li>
|
||||
<li>Added: Bootstrap 3 Typeahead v4.0.2 (reported by email)</li>
|
||||
<li>Added: Chart.js (JS-Bundle & CSS) v2.9.3 (reported by email)</li>
|
||||
<li>Improved: Option to enable HTML-Filter by default (<a href="https://codeberg.org/nobody/LocalCDN/issues/33">#33</a>)</li>
|
||||
</ul>
|
||||
<div class="topic-label">
|
||||
Generate rule sets for uBlock or uMatrix
|
||||
|
|
Loading…
Reference in New Issue