diff options
Diffstat (limited to 'pages')
| -rw-r--r-- | pages/help_dialog.coffee | 8 | ||||
| -rw-r--r-- | pages/options.coffee | 4 |
2 files changed, 5 insertions, 7 deletions
diff --git a/pages/help_dialog.coffee b/pages/help_dialog.coffee index 990fa063..b2d33f95 100644 --- a/pages/help_dialog.coffee +++ b/pages/help_dialog.coffee @@ -1,9 +1,5 @@ -# This overrides the HelpDialog implementation in vimium_frontend.coffee, which prevents us from being able -# to spawn a help dialog within the help dialog UIComponent. As such, we need to provide all the properties -# that we expect on the normal HelpDialog implementation. -# -# NOTE(mrmr1993): In the future, we can move to a single help dialog UIComponent per tab (ie. in the -# top-level frame), and then we don't need to be concerned about nested help dialog frames. +# This overrides the HelpDialog implementation in vimium_frontend.coffee. We provide aliases for the two +# HelpDialog methods required by normalMode (isShowing() and toggle()). HelpDialog = dialogElement: null isShowing: -> true diff --git a/pages/options.coffee b/pages/options.coffee index 3e1843a7..883405e6 100644 --- a/pages/options.coffee +++ b/pages/options.coffee @@ -234,7 +234,9 @@ initOptionsPage = -> event.preventDefault() activateHelpDialog = -> - HelpDialog.toggle chrome.extension.getBackgroundPage().helpDialogHtml true, true, "Command Listing" + request = showUnboundCommands: true, showCommandNames: true, customTitle: "Command Listing" + chrome.runtime.sendMessage extend(request, handler: "getHelpDialogHtml"), (response) -> + HelpDialog.toggle {html: response} saveOptions = -> Option.saveOptions() |
