diff options
| author | jez | 2011-01-31 10:37:29 +0800 |
|---|---|---|
| committer | jez | 2011-01-31 10:43:29 +0800 |
| commit | 3f34de770e11b41183e914a7fd7e66a4ac877730 (patch) | |
| tree | 9182f9066b1e64855568c995dd590e253e3907aa /helpDialog.html | |
| parent | 761ce574cf63cd5cea299e1dad917a459c572cbf (diff) | |
| parent | 35d58590b0e09e88c92ca3d49b5ba3b1ff622665 (diff) | |
| download | vimium-3f34de770e11b41183e914a7fd7e66a4ac877730.tar.bz2 | |
Merge branch 'master' into filter-hints
Conflicts:
CREDITS
commands.js
Diffstat (limited to 'helpDialog.html')
| -rw-r--r-- | helpDialog.html | 42 |
1 files changed, 39 insertions, 3 deletions
diff --git a/helpDialog.html b/helpDialog.html index ee35fc9b..c21c8b7b 100644 --- a/helpDialog.html +++ b/helpDialog.html @@ -55,9 +55,10 @@ font-weight:bold; padding-top:3px; } - #vimiumHelpDialog .commandName { - font-family:"courier new"; - } + #vimiumHelpDialog .commandName { font-family:"courier new"; } + /* Advanced commands are hidden by default until you show them. */ + #vimiumHelpDialog .advanced { display: none; } + #vimiumHelpDialog .advanced td:nth-of-type(3) { color: #555; } #vimiumHelpDialog .closeButton { position:absolute; right:10px; @@ -79,7 +80,13 @@ cursor:default; -webkit-user-select:none; } + #vimiumHelpDialogFooter { position: relative; } #vimiumHelpDialogFooter * { font-size:10px; } + #vimiumHelpDialogFooter .toggleAdvancedCommands { + position: absolute; + right: 2px; + top: -34px; + } </style> <!-- Note that the template placeholders (e.g. "pageNavigation") will be filled in by the background @@ -95,6 +102,8 @@ </div> <div class="vimiumColumn"> <table> + <tr><td></td><td></td><td class="vimiumHelpSectionTitle">Using find</td></tr> + {{findCommands}} <tr><td></td><td></td><td class="vimiumHelpSectionTitle">Navigating history</td></tr> {{historyNavigation}} <tr><td></td><td></td><td class="vimiumHelpSectionTitle">Manipulating tabs</td></tr> @@ -108,6 +117,8 @@ <div class="vimiumDivider"></div> <div id="vimiumHelpDialogFooter"> + <a href="#" class="toggleAdvancedCommands">Show advanced commands</a> + <div class="vimiumColumn"> Enjoying Vimium? <a href="https://chrome.google.com/extensions/detail/dbepggeogbaibhgnhhndojpepiihcmeb">Leave us @@ -118,4 +129,29 @@ <span>Version {{version}}</span><br/> </div> </div> + + <script> + VimiumHelpDialog = { + init: function() { + this.dialogElement = document.getElementById("vimiumHelpDialog"); + this.dialogElement.getElementsByClassName("toggleAdvancedCommands")[0].addEventListener("click", + VimiumHelpDialog.toggleAdvancedCommands, false); + }, + + /* + * Advanced commands are hidden by default so they don't overwhelm new and casual users. + */ + toggleAdvancedCommands: function(event) { + event.preventDefault(); + var advanced = VimiumHelpDialog.dialogElement.getElementsByClassName("advanced"); + var shouldShow = (advanced[0].style.display == "" || advanced[0].style.display == "none"); + VimiumHelpDialog.dialogElement.getElementsByClassName("toggleAdvancedCommands")[0].innerHTML = + shouldShow ? "Hide advanced commands" : "Show advanced commands"; + for (var i = 0; i < advanced.length; i++) + advanced[i].style.display = (shouldShow ? "table-row" : "none"); + } + }; + + VimiumHelpDialog.init(); + </script> </div> |
