Skip to content

Commit 5f4e6d8

Browse files
committed
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: - uBlockOrigin/uBlock-issues#785 (comment)
1 parent 735c2ff commit 5f4e6d8

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

src/css/popup-fenix.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,13 @@ a {
3636
position: relative;
3737
}
3838
#main {
39+
align-self: flex-start;
3940
max-width: 340px;
4041
min-width: 18em;
4142
}
43+
:root.portrait #main {
44+
align-self: inherit;
45+
}
4246
hr {
4347
border: 0;
4448
border-top: 1px solid #e3e2e3;
@@ -260,6 +264,9 @@ body[data-more=""] #lessButton {
260264
text-align: right;
261265
--rule-cell-width: 5em;
262266
}
267+
:root.desktop body.vMin #firewall {
268+
max-height: 100vh;
269+
}
263270
#firewall > div {
264271
border: 0;
265272
direction: ltr;

src/js/background.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ const µBlock = (( ) => { // jshint ignore:line
6868
popupFontSize: 'unset',
6969
popupPanelDisabledSections: 0,
7070
popupPanelLockedSections: 0,
71+
popupPanelHeightMode: 0,
7172
requestJournalProcessPeriod: 1000,
7273
selfieAfter: 3,
7374
strictBlockingBypassDuration: 120,

src/js/messaging.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ const popupDataFromTabId = function(tabId, tabTitle) {
290290
popupPanelSections: µbus.popupPanelSections,
291291
popupPanelDisabledSections: µb.hiddenSettings.popupPanelDisabledSections,
292292
popupPanelLockedSections: µb.hiddenSettings.popupPanelLockedSections,
293+
popupPanelHeightMode: µb.hiddenSettings.popupPanelHeightMode,
293294
tabId: tabId,
294295
tabTitle: tabTitle,
295296
tooltipsDisabled: µbus.tooltipsDisabled

src/js/popup-fenix.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,11 @@ let renderOnce = function() {
639639
if ( popupData.advancedUserEnabled !== true ) {
640640
uDom('#firewall [title][data-src]').removeAttr('title');
641641
}
642+
643+
// This must be done the firewall is populated
644+
if ( popupData.popupPanelHeightMode === 1 ) {
645+
body.classList.add('vMin');
646+
}
642647
};
643648

644649
/******************************************************************************/

0 commit comments

Comments
 (0)