Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
87 lines (78 sloc) 4.08 KB
<!--
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>