Winclose was already there but was much less useful (could only close
the current window). This commit enables closing other windows and
provides completions for it.
Related issue: https://github.com/tridactyl/tridactyl/issues/794.
This will fix the issue regarding -qJ and -Jq option order. It is not
the prettiest solution but it does the work. Once there is a proper
option parser, there will be nicer way to do this.
To make this work I added jshints argument in the pipe() function in
hinting.ts file. This argument is set to true as default to preserve the
original intent of allowing javascript hinting in most cases.
As mentioned in https://github.com/tridactyl/tridactyl/issues/1229, this
userChrome file isn't kept up to date. It's probably better to remove it
and only support modifying the userChrome with `:guiset`, which is
slightly more tested.
Before this commit, if Tridactyl failed to execute :editor (e.g. because
editorcmd isn't defined), the edited element would keep its
TridactylEditing class.
Closes https://github.com/tridactyl/tridactyl/issues/1298
This commit adds searchengine support to tridactyl. Avoiding code
duplication between open and tabopen required changing the way tabopen
works: first, it opens a new tab pointing to Tridactyl's newtab page and
only after that does it actually navigate to where the user wants.
Before this commit, Tridactyl checked if `nativeopen` was currently
supported in `tabopen` rather than in nativeopen itself. This was a
problem because nothing prevented a user from manually calling
`:nativeopen`. The check has been moved to `nativeopen`.
Another issue was that in case of failure, Tridactyl wouldn't properly
clean up event handlers created in nativeopen. This would result in new
tabs being moved to surprising indexes. This wasn't a big deal because
said event handlers removed themselves after executing once but it'd
still result in a bug. This has been fixed too.
Apparently, on github,
`document.querySelectorAll("a,link[rel='alternate']")` can return
anchors that are actually svg elements. This would be fine if these
elements had string hrefs, but that's not the case. These elements have
svg hrefs and this makes getRssLinks() fail, which in turn makes opening
the command line fail because of completions. The easy solution is to
simply make sure elements have a string href. The hard solution is
creating a proper statusline where errors will be logged without taking
over the command line.
https://github.com/tridactyl/tridactyl/issues/1197 is a bug where
settings aren't properly loaded on `:source` because tridactyl performs
concurrent writes on the config. Making sure every function/excmd
returns its last promise restores synchronicity when it's needed and
should thus fix#1197.
https://github.com/tridactyl/tridactyl/issues/1288 reports that
Tridactyl will happily overwrite a setting the type of which is
`object` with a string. This was caused by not checking whether
the setting being overwritten was a top-level object or a member of said
object. This commit fixes that.
Closes#1288.