diff options
| author | Phil Crosby | 2012-05-05 20:23:21 -0700 | 
|---|---|---|
| committer | Phil Crosby | 2012-05-05 20:24:33 -0700 | 
| commit | bdef276ae7ea4bd3afc06c808a50e5f60dc4584b (patch) | |
| tree | bf419110ed78373736332e04ae2415ecbcf4cf27 /help_dialog.html | |
| parent | 083ed4dc8282de961e1733e1d98a792d79befc5f (diff) | |
| download | vimium-bdef276ae7ea4bd3afc06c808a50e5f60dc4584b.tar.bz2 | |
rename help dialog
Diffstat (limited to 'help_dialog.html')
| -rw-r--r-- | help_dialog.html | 86 | 
1 files changed, 86 insertions, 0 deletions
| diff --git a/help_dialog.html b/help_dialog.html new file mode 100644 index 00000000..7bd08829 --- /dev/null +++ b/help_dialog.html @@ -0,0 +1,86 @@ +<!-- +  This is shown when typing "?". This HTML is loaded by the background page and then populated with the +  latest keybindings information before displaying. +--> +  <!-- Note that the template placeholders (e.g. "pageNavigation") will be filled in by the background +       page with the up-to-date key bindings when the dialog is shown. --> +  <div id="vimiumHelpDialog" class="vimiumReset"> +  <a class="vimiumReset optionsPage" href="#">Options</a> +  <a class="vimiumReset closeButton" href="#">x</a> +  <div id="vimiumTitle" class="vimiumReset"><span class="vimiumReset" style="color:#2f508e">Vim</span>ium {{title}}</div> +  <div class="vimiumReset vimiumColumn"> +    <table class="vimiumReset"> +      <tbody class="vimiumReset"> +      <tr class="vimiumReset" ><td class="vimiumReset"></td><td class="vimiumReset" ></td><td class="vimiumReset vimiumHelpSectionTitle">Navigating the page</td></tr> +      {{pageNavigation}} +      </tbody> +    </table> +  </div> +  <div class="vimiumReset vimiumColumn"> +    <table class="vimiumReset" > +      <tbody class="vimiumReset"> +      <tr class="vimiumReset" ><td class="vimiumReset" ></td><td class="vimiumReset" ></td><td class="vimiumReset vimiumHelpSectionTitle">Using find</td></tr> +      {{findCommands}} +      <tr class="vimiumReset" ><td class="vimiumReset" ></td><td class="vimiumReset" ></td><td class="vimiumReset vimiumHelpSectionTitle">Navigating history</td></tr> +      {{historyNavigation}} +      <tr class="vimiumReset" ><td class="vimiumReset" ></td><td class="vimiumReset" ></td><td class="vimiumReset vimiumHelpSectionTitle">Manipulating tabs</td></tr> +      {{tabManipulation}} +      <tr class="vimiumReset" ><td class="vimiumReset" ></td><td class="vimiumReset" ></td><td class="vimiumReset vimiumHelpSectionTitle">Miscellaneous</td></tr> +      {{misc}} +      </tbody> +    </table> +  </div> + +  <br clear="both"/> +  <div class="vimiumReset vimiumDivider"></div> + +  <div id="vimiumHelpDialogFooter" class="vimiumReset"> +    <a href="#" class="vimiumReset toggleAdvancedCommands">Show advanced commands</a> + +    <div class="vimiumReset vimiumColumn"> +      Enjoying Vimium? +      <a class="vimiumReset" href="https://chrome.google.com/extensions/detail/dbepggeogbaibhgnhhndojpepiihcmeb">Leave us +          feedback</a>.<br/> +      Found a bug? <a class="vimiumReset" href="http://github.com/philc/vimium/issues">Report it here</a>. +    </div> +    <div class="vimiumReset vimiumColumn" style="text-align:right"> +      <span class="vimiumReset">Version {{version}}</span><br/> +    </div> +  </div> + +  <script> +    VimiumHelpDialog = { +      // This setting is pulled out of local storage. It's false by default. +      advancedCommandsVisible: {{showAdvancedCommands}}, + +      init: function() { +        this.dialogElement = document.getElementById("vimiumHelpDialog"); +        this.dialogElement.getElementsByClassName("toggleAdvancedCommands")[0].addEventListener("click",  +          VimiumHelpDialog.toggleAdvancedCommands, false); +        this.dialogElement.style.maxHeight = window.innerHeight - 80; +        this.showAdvancedCommands(this.advancedCommandsVisible); +      }, + +      /* +       * Advanced commands are hidden by default so they don't overwhelm new and casual users. +       */ +      toggleAdvancedCommands: function(event) { +        event.preventDefault(); +        VimiumHelpDialog.advancedCommandsVisible = !VimiumHelpDialog.advancedCommandsVisible; +        chrome.extension.sendRequest({ handler: "saveHelpDialogSettings", +            showAdvancedCommands: VimiumHelpDialog.advancedCommandsVisible }); +        VimiumHelpDialog.showAdvancedCommands(VimiumHelpDialog.advancedCommandsVisible); +      }, + +      showAdvancedCommands: function(visible) { +        VimiumHelpDialog.dialogElement.getElementsByClassName("toggleAdvancedCommands")[0].innerHTML = +            visible ? "Hide advanced commands" : "Show advanced commands"; +        var advanced = VimiumHelpDialog.dialogElement.getElementsByClassName("advanced"); +        for (var i = 0; i < advanced.length; i++) +          advanced[i].style.display = (visible ? "table-row" : "none"); +      } +    }; + +    VimiumHelpDialog.init(); +  </script> +</div> | 
