Ensure content of NoScript prompts is always visible.
This commit is contained in:
parent
7b3fc6c0b7
commit
8169a7f561
|
@ -63,8 +63,8 @@ var Prompts = (() => {
|
||||||
checks: [],
|
checks: [],
|
||||||
buttons: [_("Ok"), _("Cancel")],
|
buttons: [_("Ok"), _("Cancel")],
|
||||||
multiple: "close", // or "queue", or "focus"
|
multiple: "close", // or "queue", or "focus"
|
||||||
width: 400,
|
width: 500,
|
||||||
height: 300,
|
height: 400,
|
||||||
alwaysOnTop: true,
|
alwaysOnTop: true,
|
||||||
},
|
},
|
||||||
async prompt(features) {
|
async prompt(features) {
|
||||||
|
|
|
@ -6,6 +6,7 @@ body {
|
||||||
color: #222;
|
color: #222;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
|
background: linear-gradient(to bottom, #e4f5fc 0%,#bfe8f9 41%,#9fd8ef 90%,#2ab0ed 100%) no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
#header {
|
#header {
|
||||||
|
@ -13,10 +14,9 @@ body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
color: #048;
|
color: #048;
|
||||||
position: relative;
|
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
z-index: 500;
|
z-index: 500;
|
||||||
padding: 8px;
|
padding: 8px 8px 0 8px;
|
||||||
display: block;
|
display: block;
|
||||||
background: url(/img/icon96.png) no-repeat top right;
|
background: url(/img/icon96.png) no-repeat top right;
|
||||||
height: 96px;
|
height: 96px;
|
||||||
|
@ -25,23 +25,21 @@ body {
|
||||||
#title {
|
#title {
|
||||||
margin-right: 96px;
|
margin-right: 96px;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#main {
|
#main {
|
||||||
background: linear-gradient(to bottom, #e4f5fc 0%,#bfe8f9 41%,#9fd8ef 90%,#2ab0ed 100%) no-repeat;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 120px 16px 16px 16px;
|
padding: 0 16px;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
right:0;
|
right:0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
position: fixed;
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
overflow: auto;
|
||||||
}
|
}
|
||||||
#message {
|
#message {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
|
|
|
@ -88,4 +88,18 @@
|
||||||
for (let b of document.querySelectorAll("#buttons button")) {
|
for (let b of document.querySelectorAll("#buttons button")) {
|
||||||
b.addEventListener("click", buttonClicked);
|
b.addEventListener("click", buttonClicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let resize = async () => {
|
||||||
|
let win = await browser.windows.getCurrent();
|
||||||
|
let delta = document.documentElement.offsetHeight - window.innerHeight;
|
||||||
|
await browser.windows.update(win.id, {
|
||||||
|
width: win.width, height: win.height + delta,
|
||||||
|
left: win.left, top: win.top - Math.round(delta / 2)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (document.readyState === "complete") {
|
||||||
|
resize();
|
||||||
|
} else {
|
||||||
|
window.addEventListener("load", resize);
|
||||||
|
}
|
||||||
})();
|
})();
|
||||||
|
|
Loading…
Reference in New Issue