mirror of https://github.com/gorhill/uBlock.git
this fixes #224
This commit is contained in:
parent
73ac79feff
commit
e968f392ef
|
@ -468,7 +468,7 @@ body.portrait #firewallContainer > div > span:nth-of-type(4) {
|
||||||
display: none;
|
display: none;
|
||||||
left: 4px;
|
left: 4px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
position: absolute;
|
position: fixed;
|
||||||
top: 4px;
|
top: 4px;
|
||||||
}
|
}
|
||||||
#rulesetTools > span {
|
#rulesetTools > span {
|
||||||
|
|
|
@ -45,6 +45,21 @@ document.querySelector('#panes > div:nth-of-type(2)').style.setProperty(
|
||||||
document.querySelector('#panes > div:nth-of-type(1)').offsetHeight + 'px'
|
document.querySelector('#panes > div:nth-of-type(1)').offsetHeight + 'px'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// The padlock/eraser must be manually positioned:
|
||||||
|
// - Its vertical position depends on the height of the popup title bar
|
||||||
|
// - Its horizontal position depends on whether there is a vertical scrollbar.
|
||||||
|
document.getElementById('rulesetTools').style.setProperty(
|
||||||
|
'top',
|
||||||
|
(document.getElementById('gotoPrefs').getBoundingClientRect().bottom + 3) + 'px'
|
||||||
|
);
|
||||||
|
|
||||||
|
var positionRulesetTools = function() {
|
||||||
|
document.getElementById('rulesetTools').style.setProperty(
|
||||||
|
'left',
|
||||||
|
(document.getElementById('firewallContainer').getBoundingClientRect().left + 3) + 'px'
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
// https://github.com/chrisaljoudi/uBlock/issues/996
|
// https://github.com/chrisaljoudi/uBlock/issues/996
|
||||||
// Experimental: mitigate glitchy popup UI: immediately set the firewall pane
|
// Experimental: mitigate glitchy popup UI: immediately set the firewall pane
|
||||||
// visibility to its last known state. By default the pane is hidden.
|
// visibility to its last known state. By default the pane is hidden.
|
||||||
|
@ -284,6 +299,8 @@ var updateAllFirewallCells = function() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
positionRulesetTools();
|
||||||
|
|
||||||
uDom('#firewallContainer').toggleClass(
|
uDom('#firewallContainer').toggleClass(
|
||||||
'dirty',
|
'dirty',
|
||||||
popupData.matrixIsDirty === true
|
popupData.matrixIsDirty === true
|
||||||
|
@ -648,6 +665,7 @@ var toggleMinimize = function() {
|
||||||
name: 'firewallPaneMinimized',
|
name: 'firewallPaneMinimized',
|
||||||
value: popupData.firewallPaneMinimized
|
value: popupData.firewallPaneMinimized
|
||||||
});
|
});
|
||||||
|
positionRulesetTools();
|
||||||
};
|
};
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue