Commit graph

732 commits

Author SHA1 Message Date
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
glacambre
7b5f7ef298
Minor code cleanups
This commit makes error messages when the native messenger is
unavailable easier to read. Since they're easier to read, there's no
need for custom errors in setclip/getclip anymore, provided that the
errors they throw are correctly logged. In order to make sure of that,
we remove the try/catch in excmds.ts:clipboard(), which should let
errors bubble up as needed.

I also noticed that while {set,get}Clipboard relied on the command line
being focused in order to work, they didn't do that themselves and
instead expected their callers to have set things up. This didn't make
sense to me so I moved the focusing code inside of {set,get}Clipboard.

This was all done while chasing the elusive #1135 but probably doesn't
change anything about it.
2018-11-07 06:21:36 +01:00
Oliver Blanthorn
9cf2c2f205
Hide fullscreen internal constant 2018-11-06 12:42:45 +00:00
Oliver Blanthorn
3bdd795e81
Merge pull request #1147 from glacambre/fix_commandline_space
Fix commandline failing to insert spaces in middle of words
2018-11-06 09:08:44 +00:00
glacambre
3d878a5ac3
excmds.ts: Don't rely on activeTab().index for tabprev/tabnext
Because of a firefox bug (
https://bugzilla.mozilla.org/show_bug.cgi?id=1504775 ), indexes are not
necessarily contiguous. This becomes an issue in tabnext and tabprev as
these two functions expect contiguous indexes.
We circumvent this issue by grabbing an array of all tabs for the
current window, sorting them by index and the using their index within
that array in order to decide what tabs should be selected.

This fixes https://github.com/tridactyl/tridactyl/issues/990 .
2018-11-06 07:55:14 +01:00
glacambre
b30c68fa51
Fix commandline failing to insert spaces in middle of words
Before this commit, it was impossible to insert a space in the middle of
a word in the command line ; the space would always be inserted at its
end.
2018-11-06 02:19:34 +01:00
Oliver Blanthorn
7f034a161c
Merge branch 'type_compiler' 2018-11-05 13:24:35 +00:00
glacambre
170ce78115
scrolling.ts: Fix sticky scrolling
Before this commit, Tridactyl used to "stick" at a page's edge. This was
caused by some values (namely lastX and lastY) that should have been
cached not being cached, resulting in Tridactyl trying to start
scrolling from the wrong element.

While testing this fix, I noticed that scrolling could be extremely slow
on large pages (e.g. https://stripe.com/docs/api). I attempted to fix
that by switching from a dumb parent/childNode traversal to a
TreeWalker-based traversal. While this helps a lot, scrolling can still
be slow on such pages.
2018-11-05 07:19:41 +01:00
glacambre
b5da7705e9
Improve generated metadata types for objects
Before this commit, the compiler pass that generated metadata for
settings didn't generate informetion precise enough to be used to
validate settings that existed in objects (e.g. `logging.cmdline`).

This resulted in no typechecking being done for these settings (e.g.
`:set logging.cmdline 1` would not throw any errors). This commit fixes
that.
2018-11-04 17:28:15 +01:00
glacambre
d80fa64b03
Turn numerical config settings into numbers
This commit turns every numerical config settings into numbers.
Previously, they were stored as string as casting the arguments of the
set excmd was slightly complicated. However, now that arguments are
automatically cast, there is no reason to keep using strings.

In fact, switching to number makes things simpler and fixes a few bugs
where the config setting was accessed without being cast, like in
text_to_speech.ts or completions/History.ts.
2018-11-04 17:28:11 +01:00
glacambre
4d0f7c84eb
Make the generated metadata typed
This commit makes the compiler pass use different classes in order to
represent the metadata. This enables adding per-class toString/convert
functions. This enables easy type checking and conversion in the `:set`
excmd.
2018-11-04 17:24:16 +01:00
Oliver Blanthorn
d796f3bf14
Merge branch 'generic_cmdline' 2018-11-04 12:28:31 +00:00
glacambre
946e8031ad
Various tutorial improvements
This commit renames tutorial pages with the number in which they are
visited by the user. This helps when you need to add a new page and want
to link to the previous/next one in it.

It also adds a new page about the native messenger which describes what
it does and how to install it. I took this opportunity to rename
installnative to nativeinstall and to add an ex alias that goes the
other way.

Last, this commit  mentions that `:help` also accepts settings and keys
as argument and that we now have a troobleshooting guide.
2018-11-03 08:06:30 +01:00
glacambre
def94f795d
Document ex.* functions 2018-11-02 06:33:09 +01:00