Commit graph

745 commits

Author SHA1 Message Date
glacambre
7c26cf8f9c
excmds.ts: Remove nativeopen checks from winopen
These checks are performed in nativeopen anyway.
2019-02-04 08:00:51 +01:00
glacambre
c0bbdcb536
excmds.ts: Make winopen use openInTab 2019-02-04 07:58:10 +01:00
Oliver Blanthorn
76a707bb1f
Minor doc fixes 2019-01-28 16:32:07 +00:00
glacambre
ea257f3644
Add searchengine support
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.
2019-01-27 13:04:51 +01:00
Oliver Blanthorn
ba0dea0349
Merge branch 'make_find_faster' 2019-01-22 15:44:48 +00:00
Oliver Blanthorn
5d91d29c01
Polish find mode for release 2019-01-22 15:26:15 +00:00
glacambre
08b8ff7bb4
excmds.ts: Fix nativeopen not doing proper checks or cleaning up
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.
2019-01-22 07:06:53 +01:00
Oliver Blanthorn
1692c0ccff
Merge pull request #1291 from glacambre/fix_getrsslinks
excmds.ts: Make sure getRssLinks() only works with string hrefs
2019-01-21 20:16:09 +00:00
Oliver Blanthorn
66cdc89536
Merge pull request #1290 from glacambre/fix_1197
Make more functions return their last promise
2019-01-21 20:14:45 +00:00
glacambre
beaefa444b
excmds.ts: Make sure getRssLinks() only works with string hrefs
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.
2019-01-21 20:04:26 +01:00
glacambre
ae506cc65b
Make more functions return their last promises
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.
2019-01-21 19:49:24 +01:00
glacambre
0fe3d190c8
src/excmds.ts: fix overwritting objects with strings on user error
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.
2019-01-21 19:15:00 +01:00
glacambre
a353c51354
Impletment sessions completion
Sessions completion let us provide completions for the `:undo` ex
command, which can be useful if you need to restore an older tab.

Closes https://github.com/tridactyl/tridactyl/issues/1127.
2019-01-19 18:06:05 +01:00
Oliver Blanthorn
3cf176bb05
Fix minor typos 2019-01-15 17:54:42 +00:00
Oliver Blanthorn
2ee47a9941
Merge branch 'master' into make_find_faster
Rebases are for people who understand how git works.
2019-01-15 17:09:16 +00:00
Martin André
208435208c Fix rendering for reset and reseturl related links
Wrong indentation caused the "See also" section for `reset` and
`reseturl` commands documentation to render HTML <a> tags instead of
links.
2019-01-02 16:53:40 +01:00
Martin André
eefa9ceb50 Fix followpagepatterns examples
The example for followpagepatterns.prev was wrongly using `»` and `>>`
instead of `«` and `<<`.
2019-01-02 16:51:12 +01:00
glacambre
ad737c4689
excmds.ts: Make getRssLinks() return more matches
Standards are for nerds and the BBC isn't for nerds, that's why they use
regular anchors instead of alternate links in order to point to rss
documents on the following page:
https://www.bbc.com/news/10628494

This commit makes sure these links are also picked up by rssexec.
2018-12-29 21:05:45 +01:00
glacambre
b491bcbb29
Turn rsscmd into an ex command
As suggested by bovine3dom in #1263.
2018-12-28 11:21:11 +01:00
glacambre
10eade5646
{excmds,lib/config}.ts: implement getrss ex command
The getrss command lives in the background for easy communication with
the native messenger and uses a helper, getRssLinks, that lives in the
content script.
2018-12-27 11:05:22 +01:00
glacambre
ab196175ac
Replace return await promise with return promise
Awaiting a promise before returning it doesn't make sense if the await
isn't in a try/catch as awaiting forces a function to be async and thus
turns its return value and any error it might throw into a promise.
Worse than that, it can result in an unnecessary context switch which
could be bad for performance.
2018-12-26 15:33:22 +01:00
Oliver Blanthorn
1ed5823057
Merge branch 'move_fillcmdline_content' 2018-12-23 15:01:45 +00:00
Oliver Blanthorn
056d881851
Add snow_mouse_mode 2018-12-20 22:32:24 +00:00
glacambre
b6d358969d
excmds.ts: Move fillcmdline* to content script 2018-12-20 08:15:44 +01:00
glacambre
c259283e96
excmds.ts: Move hidecmdline to content script 2018-12-20 07:47:54 +01:00
glacambre
c9bcd37033
excmds.ts: Move showcmdline to content script 2018-12-20 07:47:33 +01:00
glacambre
033dd91604
excmds.ts: hide internal symbols
No need to show TRI_VERSION and fullscreenApiIsPrefixed in the
doc/completions.
2018-12-19 08:16:33 +01:00
glacambre
e1d408dcd2
excmds.ts: Fix raw html appearing in documentation
Closes #1170.
2018-12-19 08:12:26 +01:00
glacambre
8be9428fc4
excmds.ts: document ignore mode behavior
Closes #1193.
2018-12-19 08:04:23 +01:00
glacambre
076381cb81
{excmds,lib/config}.ts: Better document searchurls
Closes #1107
2018-12-19 07:53:11 +01:00
Oliver Blanthorn
0a073079fc
Add no_mouse_mode and documentation 2018-12-17 17:30:58 +00:00
Oliver Blanthorn
6cb5816557
Fix #1235 - updatenag was checking the wrong date 2018-12-14 20:47:28 +00:00
Oliver Blanthorn
bc01010512
Fix #1230: document winopen -private 2018-12-13 14:40:25 +00:00
Oliver Blanthorn
2e0774df79
Merge branch 'thwart-yellow' 2018-12-08 19:59:43 +00:00
Oliver Blanthorn
2aad15177e
Make updatecheck only fire once per new version 2018-12-08 19:59:21 +00:00
glacambre
504db0f8c0
excmds.ts: Make hint -c use all given selectors
Before this commit, hint -c would only use the `selectors` parameter in
order to find the elements it needed to add hints to. This was a problem
when using invocations such as `:hint -c a, b`, because `b` would be put
in the rest argument by the excmd parser and `:hint` would end up trying
to use the `a, ` selector alone, which isn't a valid selector and then
would make the whole command fail.

This commit fixes that by making sure `hint -c` uses all available
arguments as selectors.
2018-12-08 05:59:49 +01:00
Oliver Blanthorn
2aa36f7554
Check for updates at start, only nag if it's been a while 2018-12-07 15:40:20 +00:00
Oliver Blanthorn
a5ff5ccbca
Add rudimentary version checker 2018-12-07 00:31:16 +00:00
Oliver Blanthorn
27e8ca3701
Merge branch 'urlspecific_noiframe' 2018-12-06 14:47:02 +00:00
scde
9ad3e09c79
Reapply PR #1150 "Only cycle through visible tabs"
It seems the actual change in PR #1150 (a09a771) has been lost in its merge (6562699).

This should now actually fix Issue #1084 and ignore hidden tabs when cycling through tabs.
2018-12-04 12:55:56 +01:00
glacambre
6e1e24b3d3
Fix 'clipboard yanksel' not working in commandline frame
Closes #1205.
2018-12-04 07:12:26 +01:00
glacambre
2b44d73ac9
Turn noiframeon setting into a site-specific setting
As discussed on riot, turning noiframeon into a site-specific setting
is a good thing for consistency. This commit also adds a deprecation
warning when users try to `:set noiframeon` and updates the
troubleshooting guide.
2018-11-28 07:58:46 +01:00
Nathan Collins
d887ddcaca [docs] Improve formatting, add example
Some of the lists were not formatted as lists and so rendered
poorly.
2018-11-20 11:23:34 -08:00
Nathan Collins
033c7f7597 [docs] Explain bind example
The most complicated example in the bind docs is exactly what I was
trying to setup, but I didn't understand what it did when I first saw
it.
2018-11-20 10:45:30 -08:00
glacambre
2ed20bf47f
{excmds,config}.ts: Turn tab{first,last} into aliases
Closes #1171.
2018-11-19 18:38:33 +01:00
glacambre
c412c8dad0
Rename buffers to tabs
Note: The CSS class names are kept as they were, see #1183 for more
information.
2018-11-19 18:35:37 +01:00
glacambre
9bf5ad1cc5
Update doc links
Issue #1176 was introduced in #1026. It should have been fixed in #1157
but slipped through the cracks. It made me realize that a few other
links were broken and so I fixed them.

Closes #1176.
2018-11-16 19:52:50 +01:00
pale3
3cf0307945
xselpaste: allow primary select paste using <S-Insert>
currently it only works on web pages and not within commandline! Cos
windows platform dosn't have primary selection, execution of <S-Insert> will silently fail
2018-11-10 17:24:23 +01:00
glacambre
56fe0d9d7e
excmds.ts: Update guiset documentation links
Fixes https://github.com/tridactyl/tridactyl/issues/1104
2018-11-08 07:03:58 +01:00
glacambre
cd55b6f0f8
Update documentation links
As cmcaine said in #1149, the help page links are currently broken
because typedoc tries to generate documentation for source files in the
`compiler/` directory. I just realized that before #1026, these files
were not referenced in any of the files in the `src` directory and this
is why typedoc ignored them. This change happened because I wanted to
type the metadata.

There are three possible solution to #1149.
- Go back to untyped metadata.
- Move the metadata types to Tridactyl's src directory on build.
- Update all links to the doc.

I believe having typed metadata is useful and I'd like to keep it that
way. Moving the metadata types to Tridactyl's src directory is certainly
doable but doesn't sound like the best idea to me, we're unnecessarily
copying files. Updating the links to the doc sounds reasonable as it's
only a one-time thing and so this is what this commit does in order to
close #1149.
2018-11-08 07:00:35 +01:00