mirror of
https://codeberg.org/nobody/LocalCDN.git
synced 2025-06-05 21:49:31 +02:00
Option to enable HTML-Filter by default improved (#33)
This commit is contained in:
@@ -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
|
||||
});
|
||||
|
Reference in New Issue
Block a user