mirror of https://github.com/gorhill/uBlock.git
Safari: don't need to inject a stylesheet into popup
This commit is contained in:
parent
924bcfab62
commit
3c9f5c0da1
|
@ -33,14 +33,15 @@ var onLoaded = function() {
|
|||
};
|
||||
var body = document.body, popover = safari.self;
|
||||
|
||||
var style = document.createElement("style");
|
||||
style.textContent = "html,body,#panes{width:100%}#panes{white-space:nowrap;text-align:right}#panes > div:nth-of-type(2){display:inline-block !important}";
|
||||
body.appendChild(style);
|
||||
|
||||
var panes = document.getElementById("panes"),
|
||||
powerAndStatsPane = panes.children[0],
|
||||
dfPane = panes.children[1];
|
||||
|
||||
body.style.setProperty("width", "100%");
|
||||
panes.style.setProperty("text-align", "right");
|
||||
panes.style.setProperty("width", "100%");
|
||||
dfPane.style.setProperty("display", "inline-block", "important");
|
||||
|
||||
var updateSize = function() {
|
||||
var dfEnabled = panes.classList.contains(DF_ENABLED_CLASS);
|
||||
popover.width = powerAndStatsPane.clientWidth + (dfEnabled ? dfPane.clientWidth : 0);
|
||||
|
|
Loading…
Reference in New Issue