aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--helpDialog.html2
-rw-r--r--vimiumFrontend.js7
2 files changed, 4 insertions, 5 deletions
diff --git a/helpDialog.html b/helpDialog.html
index 5feed105..e6977951 100644
--- a/helpDialog.html
+++ b/helpDialog.html
@@ -141,7 +141,6 @@
this.dialogElement.getElementsByClassName("toggleAdvancedCommands")[0].addEventListener("click",
VimiumHelpDialog.toggleAdvancedCommands, false);
this.showAdvancedCommands(this.advancedCommandsVisible);
- this.centerDialog();
},
/*
@@ -153,7 +152,6 @@
chrome.extension.sendRequest({ handler: "saveHelpDialogSettings",
showAdvancedCommands: VimiumHelpDialog.advancedCommandsVisible });
VimiumHelpDialog.showAdvancedCommands(VimiumHelpDialog.advancedCommandsVisible);
- VimiumHelpDialog.centerDialog();
},
showAdvancedCommands: function(visible) {
diff --git a/vimiumFrontend.js b/vimiumFrontend.js
index 4307b481..4bb8d07e 100644
--- a/vimiumFrontend.js
+++ b/vimiumFrontend.js
@@ -683,13 +683,14 @@ function showHelpDialog(html, fid) {
document.body.appendChild(container);
container.innerHTML = html;
+ container.getElementsByClassName("closeButton")[0].addEventListener("click", hideHelpDialog, false);
+ container.getElementsByClassName("optionsPage")[0].addEventListener("click",
+ function() { chrome.extension.sendRequest({ handler: "openOptionsPageInNewTab" }); }, false);
+
// This is necessary because innerHTML does not evaluate javascript embedded in <script> tags.
var scripts = Array.prototype.slice.call(container.getElementsByTagName("script"));
scripts.forEach(function(script) { eval(script.text); });
- container.getElementsByClassName("closeButton")[0].addEventListener("click", hideHelpDialog, false);
- container.getElementsByClassName("optionsPage")[0].addEventListener("click",
- function() { chrome.extension.sendRequest({ handler: "openOptionsPageInNewTab" }); }, false);
}
function hideHelpDialog(clickEvent) {