aboutsummaryrefslogtreecommitdiffstats
path: root/vimiumFrontend.js
diff options
context:
space:
mode:
authorPhil Crosby2010-03-07 18:29:20 -0800
committerPhil Crosby2010-03-07 22:50:32 -0800
commit25a813129b28a622ec17e139afedca8bc53305c8 (patch)
tree46953e171e37f8296beaa52b3ac2e1e6553c9377 /vimiumFrontend.js
parentc1a94a80815ea619ae01977c0e30e53113bb4a9e (diff)
downloadvimium-25a813129b28a622ec17e139afedca8bc53305c8.tar.bz2
Vertically center the help dialog.
Diffstat (limited to 'vimiumFrontend.js')
-rw-r--r--vimiumFrontend.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/vimiumFrontend.js b/vimiumFrontend.js
index a7dd263d..70ff77c6 100644
--- a/vimiumFrontend.js
+++ b/vimiumFrontend.js
@@ -499,6 +499,10 @@ function showHelpDialog(html) {
container.innerHTML = html;
container.getElementsByClassName("closeButton")[0].addEventListener("click", hideHelpDialog, false);
document.body.appendChild(container);
+ var dialog = document.getElementById("vimiumHelpDialog");
+ var zoomFactor = currentZoomLevel / 100.0;
+ dialog.style.top =
+ Math.max((window.innerHeight - dialog.clientHeight * zoomFactor) / 2.0, 20) / zoomFactor + "px";
}
function hideHelpDialog() {