mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
[mv3] Make strict-blocking checkbox dependent on filtering mode
Related feedback: https://github.com/uBlockOrigin/uBOL-home/issues/214#issuecomment-2528072997
This commit is contained in:
parent
51ef43c0de
commit
20a570ebe8
3 changed files with 11 additions and 5 deletions
|
|
@ -30,8 +30,9 @@ body[data-forbid~="filteringMode"] section[data-pane="settings"] > div:has(> h3[
|
|||
display: none;
|
||||
}
|
||||
|
||||
#showBlockedCount:has(input[type="checkbox"][disabled]) {
|
||||
opacity: 0.5;
|
||||
label:has(input[type="checkbox"][disabled]),
|
||||
label:has(input[type="checkbox"][disabled]) + legend {
|
||||
filter: var(--checkbox-disabled-filter);
|
||||
}
|
||||
|
||||
#defaultFilteringMode {
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@
|
|||
<p><label id="autoReload" data-i18n="autoReloadLabel"><span class="input checkbox"><input type="checkbox"><svg viewBox="0 0 24 24"><path d="M1.73,12.91 8.1,19.28 22.79,4.59"/></svg></span>_</label>
|
||||
</p>
|
||||
<p><label id="showBlockedCount" data-i18n="showBlockedCountLabel"><span class="input checkbox"><input type="checkbox"><svg viewBox="0 0 24 24"><path d="M1.73,12.91 8.1,19.28 22.79,4.59"/></svg></span>_</label>
|
||||
<p><label id="strictBlockMode" data-i18n="enableStrictBlockLabel"><span class="input checkbox"><input type="checkbox"><svg viewBox="0 0 24 24"><path d="M1.73,12.91 8.1,19.28 22.79,4.59"/></svg></span>_</label><legend data-i18n="enableStrictBlockLegend"></legend>
|
||||
<p id="developerMode" hidden><label><span class="input checkbox"><input type="checkbox"><svg viewBox="0 0 24 24"><path d="M1.73,12.91 8.1,19.28 22.79,4.59"/></svg></span>Developer mode</label>
|
||||
</div>
|
||||
|
||||
<div class="firstRun">
|
||||
|
|
@ -90,6 +88,8 @@
|
|||
<div data-i18n="completeFilteringModeDescription"></div>
|
||||
</label>
|
||||
</div>
|
||||
<p><label id="strictBlockMode" data-i18n="enableStrictBlockLabel"><span class="input checkbox"><input type="checkbox"><svg viewBox="0 0 24 24"><path d="M1.73,12.91 8.1,19.28 22.79,4.59"/></svg></span>_</label><legend data-i18n="enableStrictBlockLegend"></legend>
|
||||
<p id="developerMode" hidden><label><span class="input checkbox"><input type="checkbox"><svg viewBox="0 0 24 24"><path d="M1.73,12.91 8.1,19.28 22.79,4.59"/></svg></span>Developer mode</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
|
|
|||
|
|
@ -67,7 +67,12 @@ function renderWidgets() {
|
|||
}
|
||||
}
|
||||
|
||||
qs$('#strictBlockMode input[type="checkbox"]').checked = cachedRulesetData.strictBlockMode;
|
||||
{
|
||||
const input = qs$('#strictBlockMode input[type="checkbox"]');
|
||||
const canStrictBlock = cachedRulesetData.defaultFilteringMode > 1;
|
||||
input.checked = canStrictBlock && cachedRulesetData.strictBlockMode;
|
||||
dom.attr(input, 'disabled', canStrictBlock ? null : '');
|
||||
}
|
||||
|
||||
{
|
||||
dom.prop('#developerMode input[type="checkbox"]', 'checked',
|
||||
|
|
|
|||
Loading…
Reference in a new issue