diff options
Diffstat (limited to 'options.html')
| -rw-r--r-- | options.html | 142 |
1 files changed, 142 insertions, 0 deletions
diff --git a/options.html b/options.html new file mode 100644 index 00000000..23acd20a --- /dev/null +++ b/options.html @@ -0,0 +1,142 @@ +<html> + <head> + <title>Vimium Options</title> + <style type="text/css" media="screen"> + body { + font-family:"helvetica neue", "helvetica", "arial", "sans"; + width:600px; + margin:10px auto; + } + .example { + font-size:80%; + color:#555; + margin-left:20px; + } + .caption { + margin-right:10px; + } + td { + padding:5px 0; + } + button#saveSettings { + margin-top:20px; + } + textarea#excludedUrls { + width:450px; + min-height:100px; + } + #status { + margin-left:10px; + font-size:80%; + } + /* Make the caption in the settings table as small as possible, to pull the other fields to the right. */ + td:nth-child(1), td:nth-child(2) { + width:1px; + white-space:nowrap; + } + </style> + </head> + + <script type="text/javascript"> + + // Saves options to localStorage. + function saveOptions() { + localStorage["scrollStepSize"] = document.getElementById("scrollStepSize").value + localStorage["defaultZoomLevel"] = document.getElementById("defaultZoomLevel").value + localStorage["excludedUrls"] = document.getElementById("excludedUrls").value; + + // Give the user some feedback that their options were saved. + var status = document.getElementById("status"); + status.innerHTML = "Settings Saved."; + setTimeout(function() { status.innerHTML = ""; }, 750); + } + + // Restores select box state to saved value from localStorage. + function populateOptions() { + // TODO(ilya): Create a single option list with defaults somewhere to share across various scripts. + var scrollStepSize = localStorage["scrollStepSize"] || 60; + var defaultZoomLevel = localStorage["defaultZoomLevel"] || 100; + var defaultExcludedUrls = localStorage["excludedUrls"] || ""; + + document.getElementById("scrollStepSize").value = scrollStepSize; + document.getElementById("defaultZoomLevel").value = defaultZoomLevel; + document.getElementById("excludedUrls").value = defaultExcludedUrls; + } + </script> + + <body onload="populateOptions()"> + <h1>Vimium - Settings</h1> + <table> + <tr> + <td class="caption">Scroll Step Size</td> + <td><input id="scrollStepSize" type="text" style="width:50px">px</td> + <td><span class="example">(default: 60)</td> + </tr> + <tr> + <td><span class="caption">Default zoom level</span></td> + <td><input id="defaultZoomLevel" type="text" value="100" style="width:50px">%</td> + <td><span class="example">(default: 100)</span></td> + </tr> + <tr> + <td colspan="3"> + <div style="position:relative"> + Excluded URLs<br/> + <div style="position:absolute; right:-240px; width:240px"> + <div class="example"> + e.g. http*://mail.google.com/*<br/> + This will disable Vimium on Gmail.<br/><br/> + Enter one URL per line.<br/> + </div> + </div> + <textarea id="excludedUrls"></textarea> + </div> + </td> + </tr> + </table> + + <button id="saveSettings" onclick="saveOptions()">Save Settings</button> + <span id="status"></status> + + <h1>Command Reference</h1> + <pre> +<c-x> is to be interpreted as ctrl + x together. + +Navigating the current page: + h scroll left + j scroll down + k scroll up + l scroll right + gg scroll to top of the page + G scroll to bottom of the page + <c-d> scroll down a page + <c-u> scroll up a page + <c-f> scroll down a full page + <c-b> scroll up a full page + f activate link hints mode to open in current page + F activate link hints mode to open in new tab + r reload + gf view source + zi zoom in + zo zoom out + / enter find mode -- type your search query and hit enter to search or esc to cancel + n cycle forward to the next find match + N cycle backward to the previous find match + i enter insert mode -- all commands will be ignored until you hit esc to exit + y copy the current url to the clipboard + +Navigating your history: + ba, H go back in history + fw, fo, L go forward in history + +Manipulating tabs: + J, gT go one tab left + K, gt go one tab right + t create tab + d close current tab + u restore closed tab (i.e. unwind the 'd' command) + +Vimium supports command repetition so, for example, hitting '5t' will open 5 tabs in rapid succession. ESC +will clear any partial commands in the queue. + </pre> + </body> +</html> |
