Commit graph

2282 commits

Author SHA1 Message Date
glacambre
5217227eb9
webext.ts: Fix openInTab() not trying to treat search queries as domains 2019-02-04 07:47:33 +01:00
glacambre
509885cb1d
webext.ts: Fix "search" not performing a literal search in openInTab()
https://github.com/tridactyl/tridactyl/pull/1305#discussion_r251495428
2019-02-04 07:31:21 +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
95be91b687
Update package-lock 2019-01-22 18:28:54 +00:00
Oliver Blanthorn
6b4c6c9c6b
Update changelog for 1.14.7
Additionally, turn all of the issue numbers into links.
2019-01-22 18:28:54 +00:00
Oliver Blanthorn
48a81c8d7b
Add script for linking to GitHub issues 2019-01-22 18:28:53 +00: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
Oliver Blanthorn
a23efda4f8
Merge pull request #1293 from glacambre/move_nativeopen_check_to_nativeopen
excmds.ts: Fix nativeopen not doing proper checks or cleaning up
2019-01-22 15:17:37 +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
444e1b91b0
Add some handy binds to my RC file 2019-01-21 21:54:34 +00: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
Oliver Blanthorn
ad2a4974f0
Merge pull request #1289 from glacambre/fix_1288
src/excmds.ts: fix overwritting objects with strings on user error
2019-01-21 18:49:51 +00: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
Oliver Blanthorn
214df84301
Merge pull request #1287 from glacambre/better_errors
native_background.ts: Improve error messages on native messenger ops
2019-01-20 13:04:00 +00:00
glacambre
cfc4bccba9
native_background.ts: Improve error messages on native messenger ops
This should help with situations such as https://github.com/tridactyl/tridactyl/issues/1284.
2019-01-20 09:15:28 +01:00
Oliver Blanthorn
ddfb5b5135
Merge pull request #1285 from glacambre/fix_icons
Fix icons
2019-01-19 17:20:55 +00:00
Oliver Blanthorn
40d37695bf
Merge pull request #1286 from glacambre/impl_undo_completions
Impletment sessions completion
2019-01-19 17:18:11 +00: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
glacambre
3ddf350dc0
html-tagged-template.js: Authorize more protocols
https://github.com/straker/html-tagged-template/issues/26 discusses
authorizing the data:// protocol. The gist of it is that it's dangerous
because data:text/html can be used for XSS attacks. We circumvent this
problem by only explicitly allowing a few image formats formatted as
base64.
2019-01-19 15:41:32 +01:00
glacambre
d1ce62ec6d
html-tagged-template.js: Accept moz-extension protocol
html-tagged-template.js forbids every protocol except http:// when
sanitizing urls. This prevents Tridactyl from loading its icons from
moz-extension urls. This commit fixes that (ignore prettier reformatting
the file, the only line I actually changed was line 314 before prettier
which became line 467 after prettier).
2019-01-19 15:21:24 +01:00
Oliver Blanthorn
3cf176bb05
Fix minor typos 2019-01-15 17:54:42 +00:00
Oliver Blanthorn
fba8087ef6
Disable find completion: it breaks stuff 2019-01-15 17:51:20 +00:00
Oliver Blanthorn
2176c8feae
Make find context text bigger and more useful 2019-01-15 17:50:51 +00:00
Oliver Blanthorn
19e6cc4ca2
Re-enable commandline completions 2019-01-15 17:32:29 +00:00
Oliver Blanthorn
c545c42514
Make find settings use the new typed configurations 2019-01-15 17:27:08 +00:00
Oliver Blanthorn
6992eb5699
Update package-lock 2019-01-15 17:09:34 +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
Oliver Blanthorn
e62eae4d15
Fix #1280: pad hints slightly more 2019-01-15 10:50:15 +00:00
Oliver Blanthorn
a81a14268f
Update settings tutorial to include help [setting] 2019-01-13 16:14:13 +00:00
Oliver Blanthorn
42c2725a9f
Update package-lock 2019-01-13 16:12:24 +00:00
Oliver Blanthorn
2046dc2d26
Merge pull request #1276 from glacambre/fix_wordpattern_doc
config.ts: fix wordpattern documentation
2019-01-10 19:08:17 +00:00
glacambre
a971e3a4ea
config.ts: fix wordpattern documentation 2019-01-10 18:12:57 +01:00
Oliver Blanthorn
ec8e2cebef
Merge pull request #1271 from glacambre/add_reset_button
help.ts: Add config-resetting button
2019-01-05 20:17:31 +00:00
glacambre
c2f1538366
help.ts: Add config-resetting button
As mentionned in https://github.com/tridactyl/tridactyl/issues/57 and
https://github.com/tridactyl/tridactyl/pull/502.
2019-01-05 19:51:52 +01:00
Oliver Blanthorn
253aac3d02
Merge pull request #1268 from mandre/doc-fixups
Doc fixups
2019-01-02 16:32:15 +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
Oliver Blanthorn
c04316c231
Merge pull request #1266 from glacambre/warn_rsscmd
config.ts: Warn about rsscmd being potentially very dangerous
2018-12-31 20:18:15 +00:00
glacambre
f310c9343d
config.ts: Warn about rsscmd being potentially very dangerous 2018-12-31 21:06:44 +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
be315ac967
Implement getrss completions 2018-12-27 11:05:47 +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
Oliver Blanthorn
5e7d716a0b
Merge pull request #1262 from glacambre/remove_return_await
Replace `return await promise` with `return promise`
2018-12-26 14:56:24 +00: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