1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-03 01:29:39 +02:00

Add ability to lock firewall height to basic pane height

New advanced setting: `popupPanelHeightMode`.
Default value: 0

Set to 1 to force the height of the firewall pane
to be no more than the height of the basic pane.

Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/785#issuecomment-622327450
This commit is contained in:
Raymond Hill 2020-05-22 08:47:51 -04:00
parent 735c2ffae2
commit 5f4e6d80e0
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
4 changed files with 14 additions and 0 deletions

View File

@ -36,9 +36,13 @@ a {
position: relative;
}
#main {
align-self: flex-start;
max-width: 340px;
min-width: 18em;
}
:root.portrait #main {
align-self: inherit;
}
hr {
border: 0;
border-top: 1px solid #e3e2e3;
@ -260,6 +264,9 @@ body[data-more=""] #lessButton {
text-align: right;
--rule-cell-width: 5em;
}
:root.desktop body.vMin #firewall {
max-height: 100vh;
}
#firewall > div {
border: 0;
direction: ltr;

View File

@ -68,6 +68,7 @@ const µBlock = (( ) => { // jshint ignore:line
popupFontSize: 'unset',
popupPanelDisabledSections: 0,
popupPanelLockedSections: 0,
popupPanelHeightMode: 0,
requestJournalProcessPeriod: 1000,
selfieAfter: 3,
strictBlockingBypassDuration: 120,

View File

@ -290,6 +290,7 @@ const popupDataFromTabId = function(tabId, tabTitle) {
popupPanelSections: µbus.popupPanelSections,
popupPanelDisabledSections: µb.hiddenSettings.popupPanelDisabledSections,
popupPanelLockedSections: µb.hiddenSettings.popupPanelLockedSections,
popupPanelHeightMode: µb.hiddenSettings.popupPanelHeightMode,
tabId: tabId,
tabTitle: tabTitle,
tooltipsDisabled: µbus.tooltipsDisabled

View File

@ -639,6 +639,11 @@ let renderOnce = function() {
if ( popupData.advancedUserEnabled !== true ) {
uDom('#firewall [title][data-src]').removeAttr('title');
}
// This must be done the firewall is populated
if ( popupData.popupPanelHeightMode === 1 ) {
body.classList.add('vMin');
}
};
/******************************************************************************/