This patch improves upon the existing zoom excmd and adds some features present
in Vimperator and Pentadactyl. `zI` and `zO` are now bound to the maximum and
minimum zoom levels respectively. `zM` (read zoom more) zooms in on increments
of 50pp and `zR` (read zoom reduce) zooms out on increments of 50pp.
In addition, overshooting the zoom level while using relative adjustments is now
handled by setting the level to it's max/min zoom level.
An error is thrown if an absolute value is given that is out of bounds of the
allowed zoom range.
f51e08d introduced a bug by defining the window.tri object in the
command line. This made the window.tri check in getURL succeed and then
'loc' was assigned undefined, as "window.tri.contentLocation" isn't
actually defined. We fix this by making sure that
"window.tri.contentLocation" is actually defined.
The commandline_frame document does not have a window.tri object. This
makes the commandline throw an exception on page load. We fix this by
using 'window.tri || {}' in order to avoid to avoid issues should
'window.tri' be defined in the command line one day.
It is not useful to await in ownTabContainer as it could cause an
unnecessary context switch and will throw an error if the tab is not in
a container.
While it could seem like throwing errors in ownTabContainer is not a big
deal, it is actually quite annoying when using Firefox's "Pause on
exceptions" feature: execution is paused even if the error is caught by
the caller and there is no stack trace to help us understand what's
happening because ownTabContainer is async.
Thus, removing this await is very useful.
The help completion source provides completions for settings, excmds,
aliases and bindings, sorted in lexicographical order. It's basically a
huge copy-paste of the Settings and Excmd completion sources but should
be enough until we have a way to provide multiple completion sources for
a single excmd.
This commit adds input fields to some of the settings in the help page.
These input fields are filled with the value of the setting they
correspong to. Users can edit these values and save their modifications
by pressing <Enter>. This is an easy way to see and change settings and
hopefully enough to use as option page.
This is achieved by adding more ugly code to help.ts. Hopefully one day
we'll get rid of TypeDoc and do our own thing in React or whatever
framework we'll have choosen and things will be cleaner.
This commit removes unnecessary documentation, tries to make the
introduction shorter and fleshes out the documentation of a few
under-documented functions.
The previous code used <ul> and <li> in order to generate the list of
aliases/bindings related to an ex command. This was semantically correct
but required ugly CSS hacks in order to display them on a single line.
On top of that, this line didn't wrap when the list of bindings/commands
was longer that the page and thus required scrolling horizontally.
This commit replaces <ul> with <p> and <li> with span. It inserts a
space between each span and simplifies the css a bit, this results in
lines of bindings/aliases wrapping neatly.
When trying to load a theme named `test.css`, `loadtheme()` would
attempt to store it in the config as `test.css`. But the config stored
it as an object named `test` which contained a key named `css` and this
broked everything. This is fixed by making sure that users do not
specify the `.css` part of the theme themselves, instead it will be
automatically added when trying to load the file.
Documentation has been updated accordingly.
- Update the readme to mention `colors $theme` rather than `set theme
$theme` because `colors` is more powerful than `set theme`.
- Update the doc
- Version bump native messenger and nativegate check
Turning `:bmarks` into a proper excmd has several advantages: it will
show up in the `:help` pages, be available for excmd completions and
enbales adding specific arguments (such as "-t") in order to open
bookmarks in other tabs.
Doing this required moving tabopen and some of its dependencies to the
content script.
Closes https://github.com/tridactyl/tridactyl/issues/902.
Previously, running `config.get()` would result in only top level
objects being merged and returned. This means that if you ran
`config.get()`, the `nmaps` object would be the default one if no custom
bindings were defined, but it would not contain the default bindings if
custom bindings were defined.
This commit fixes that by implementing a mergeDeep function that makes
sure that children of the returned are merged with the default config.
Closes https://github.com/tridactyl/tridactyl/issues/390.
`:set noiframeon` has been broken since at least 1a1588a8 because of the
use of target.concat instead of target.push. This caused subsequent
config.set() calls to interpret every url except the last as being part
of the keys that needed to be set in the config rather that as urls that
should be saved in the noiframeon setting.
Buffer completions autoselect matches and this prevents relative
tabmoves from being easily performed. This is fixed by making sure that
autoselection only happens when the command doesn't look like a relative
tabmove.
Fixes https://github.com/tridactyl/tridactyl/issues/825
Because of the await in the input handler, exceptions that are thrown
for previous computations will be thrown for the current one too, even
if there's no reason for it to go wrong. We fix this by surrounding the
await keyword with a try/catch and simply logging the error.
This commit makes {set,get}clip display error messages when they fail to
interact with the X selection. Somehow exceptions are lost somewhere so
we use fillcmdline manually. This problem will disappear once these
functions are moved to the content script.
Fixes https://github.com/tridactyl/tridactyl/issues/959
3ec27fd broke the commandline by moving config.ts while
metadata-generation/using code relied on its path. This commit updates
the path. A proper fix is to stop using paths and use names instead.