1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-15 15:32:28 +02:00

Improve layout of popup panel when rendered in a tab

This brings back the ability to screenshot the whole
list of domains when the popup panel is opened in a
tab.
This commit is contained in:
Raymond Hill 2020-10-18 10:00:55 -04:00
parent 3bce80a7b6
commit 9947fcf4d5
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
2 changed files with 12 additions and 1 deletions

View File

@ -553,6 +553,14 @@ body:not([data-more~="e"]) [data-more="e"] {
display: none;
}
/* popup-in-tab mode, useful for screenshots */
:root.desktop.intab body {
overflow: auto;
}
:root.desktop.intab #firewall {
max-height: none;
}
/* horizontally-constrained viewport */
:root.portrait body {
overflow-y: auto;

View File

@ -1027,7 +1027,7 @@ uDom('[data-i18n="popupAnyRulePrompt"]').on('click', ev => {
messaging.send('popupPanel', {
what: 'gotoURL',
details: {
url: `popup-fenix.html?tabId=${popupData.tabId}`,
url: `popup-fenix.html?tabId=${popupData.tabId}&intab=1`,
select: true,
index: -1,
},
@ -1260,6 +1260,9 @@ const getPopupData = async function(tabId) {
panes.prepend(sticky);
}
}
if ( selfURL.searchParams.get('intab') !== null ) {
root.classList.add('intab');
}
await nextFrames(1);
document.body.classList.remove('loading');
};