Commit graph

133 commits

Author SHA1 Message Date
Oliver Blanthorn
2595ed4d14
Allow bmark to accept titles with spaces 2017-11-30 14:34:10 +00:00
Oliver Blanthorn
fdcaea0849
Fix #96: Allow set to set arrays and add homepages setting 2017-11-30 13:53:53 +00:00
Oliver Blanthorn
3a957a1e5a
Fix #59: newtab can be configured with set newtab [url] 2017-11-30 11:47:37 +00:00
John Beard
c69aac0a53 Add Text To Speech API (and hint mode)
This adds an excmd interface to the Web Speech API (TTS), which allows
users to read text out and set voice and parameters via config options.

Excmds:

    - ttsread: reads out the given text or element content (CSS selected)
    - ttsvoices: lists available voice names (can be used in the
      'ttsvoice' option)
    - ttscontrol: stops the current reading (should also pause/resume,
      but that doesn't seem to work right now)

Config options:
    - ttsvoice: the name of the voice to use
    - ttsrate: (0.1-10)
    - ttsvolume: (0-1)
    - ttspitch: (0-2)

Also the ;r hint submode is added which reads the textcontent of the
element with the configured voice
2017-11-30 04:43:55 +00:00
Oliver Blanthorn
2acfa3fbb0
set [setting] without a value will inform you of the current value 2017-11-29 21:38:30 +00:00
Oliver Blanthorn
bd6d3d4bb6
Add configuration options for hinting and documentation 2017-11-29 20:22:56 +00:00
Oliver Blanthorn
7713d5e5ff
Make all changes to config persistent, import legacy binds 2017-11-29 19:51:18 +00:00
Oliver Blanthorn
6ae704876c
Add unset for resetting a bind to default 2017-11-29 18:57:04 +00:00
Oliver Blanthorn
712037ae79
Allow users to save configuration via command line 2017-11-29 16:56:56 +00:00
Oliver Blanthorn
f23118e166
Fix #60: allow users to change default search engine 2017-11-29 16:40:16 +00:00
Oliver Blanthorn
da68d5f398
Add basic configuration with set
Currently does not import previous binds
2017-11-29 16:28:06 +00:00
Oliver Blanthorn
b990125792
Add hint -c [selector]: add hints that match selector
It's particularly good on Hacker News and Reddit with

`bind ;c hint -c [class*="expand"],[class="togg"]` for minimising
comments and expanding images.
2017-11-29 13:23:30 +00:00
Oliver Blanthorn
3c282ab1df
Merge branch 'master' of github.com:cmcaine/tridactyl into johnbeard-hintanchor 2017-11-29 11:47:50 +00:00
John Beard
f0dfe1d5da Refactor document CSS selector queries with dom.ts
The DOM.getElemsBySelector function makes it a bit less verbose to
construct an array of filtered elements matching a selector.

Also, this function is expanded to take multiple filters, applied
sequentially.
2017-11-29 02:27:49 +00:00
John Beard
a3ca5cd2c1 Add yank anchor hint submode (;#)
THis yanks the page URL with the hinted elements id or title as a hash
fragment, which can be used to link to the page at that element's
location.

For example: https://en.wikipedia.org/wiki/Vim_(text_editor)#History

;# nmap added, from Vimperator
2017-11-29 02:27:23 +00:00
Colin Caine
b4a5edd20c excmd: remove tabs. Simplify tabonly 2017-11-29 00:37:21 +00:00
Alex Kir
23f845eb3f Now looking for tabs to close only in current window 2017-11-29 00:37:21 +00:00
Alex Kir
a781c4bdd4 Added tabonly command
Executing `tabonly` will close all tabs but active and pinned
2017-11-29 00:32:31 +00:00
Colin Caine
3cae9a5334 Revert "excmd: fix :version"
This reverts commit baa5a9b861.
2017-11-28 17:23:16 +00:00
Colin Caine
e933c100d3 excmd: Replace tabchoose with tabprev_gt
The gT and gt maps in vim aren't symmetric, this better preserves
those semantics while removing a confusingly named excmd
2017-11-28 16:16:41 +00:00
Colin Caine
baa5a9b861 excmd: fix :version 2017-11-28 16:05:08 +00:00
Colin Caine
fc02d21da7 excmd: fix wrapping on tabnext/prev 2017-11-28 16:04:16 +00:00
Oliver Blanthorn
de84cd42f5
Fix #134: [count]gt now goes to nth tab
Known issues: count is ignored on gT
2017-11-28 14:28:20 +00:00
Oliver Blanthorn
758c91a5f4
Fix #150: tab{next,prev} now wrap again 2017-11-28 13:53:22 +00:00
Colin Caine
c57a829aa8 excmd: document hint 2017-11-28 02:12:07 +00:00
Colin Caine
cd82433633 excmd: Document tabs and buffers 2017-11-28 00:20:54 +00:00
Colin Caine
7dda663a47 excmd: Simplify IPC for geturlsforlinks
This is more about maybe expanding the macro system in the future. Need
to look at how other projects do it.
2017-11-28 00:20:49 +00:00
Colin Caine
ca9e3b25f0 excmd: improve tab commands 2017-11-28 00:01:41 +00:00
Colin Caine
1c8e88693c excmd: document new buffer functions 2017-11-27 19:59:43 +00:00
Colin Caine
9b68e94d94 excmd: arg to buffer is not optional 2017-11-27 19:59:43 +00:00
Robbie McMichael
53ee803bc9 Reduce code duplication in buffer function 2017-11-27 19:59:43 +00:00
Robbie McMichael
87aa3ee225 Add tabfirst and tablast commands 2017-11-27 19:59:43 +00:00
Oliver Blanthorn
f9ee2a3e9a
Add documentation for yankshort,canon 2017-11-27 19:15:04 +00:00
glacambre
dd1365f269 excmds.ts: Add yankshort and yankcanon. 2017-11-27 19:48:49 +01:00
glacambre
cb58814da3 excmds.ts: Add search urls.
This commit adds a Github, Searx, Cnrtl, OpenStreetMap, the Mozilla Dev Network
and the Gentoo wiki to the list of SEARCH_URLS.
2017-11-26 16:36:07 +01:00
Oliver Blanthorn
2ce1f9a64a
Fix #99: misleading help for bind 2017-11-26 14:56:09 +00:00
Oliver Blanthorn
1775e100ef
Make focus listener only store editable inputs 2017-11-26 12:27:54 +00:00
Oliver Blanthorn
38ff3f7ca4
Merge branch 'master' of github.com:cmcaine/tridactyl into johnbeard-focusinput 2017-11-26 12:18:14 +00:00
Oliver Blanthorn
8f49130c63
Add listener to store last focused element 2017-11-26 12:18:06 +00:00
Oliver Blanthorn
d65acf9f64
Fix #117: add :version command
:version currently fills the command line with the version number in
order to display it to the user (hacky) and copies it to the clipboard.
2017-11-26 00:06:02 +00:00
Oliver Blanthorn
c66ca2ab62
Merge branch 'master' of github.com:cmcaine/tridactyl into ollef-URIEncode 2017-11-25 16:14:05 +00:00
John Beard
221b94c8ff Add hint focus mode (;;)
This focuses the hinted element with excmd ":hint -;".

Includes VImperator binding to ";;"
2017-11-25 01:47:56 +00:00
John Beard
6a48990751 Add focusinput command (gi)
Can focus the nth input from the start or end of a page.

Also has some special modes:

  -l: last focussed input
  -p: first password input
  -b: the largest input by area
2017-11-25 01:41:38 +00:00
Olle Fredriksson
4870a967ff URI-encode search query string
This enables searching for e.g. 'C#'.

Also remove a now no longer valid comment.
2017-11-24 23:30:24 +01:00
chocolateboy
0953425cf5 improve pagination:
- prefer the canonical forms over fallback patterns
  (fixes rockpapershotgun.com, Discourse etc.):

  1) link[rel]
  2) a[rel]
  3) a::text(pattern)

- tighten fallback patterns (fixes Google, GitHub etc.)

- remove site-specific patterns
2017-11-23 15:07:48 +00:00
John Beard
a46934b2dd Add image hinting (;i, ;I)
This supports hinting of <img> tags, and will open the src attribute in
the current or BG tab.
2017-11-22 23:03:28 +00:00
Colin Caine
8a44732227 completions:
Done:
	Working completion for buffers
	Substitute values into command line
	Prepare for non-buffers completions
	Wrote too many classes and helper functions

Todo:
	Learn inferno and hopefully simplify
	If not, simplify the main functions so that people can actually
	build for it.
	Define an interface for tabbing through options
	Allow more than one CompletionSource per command
2017-11-22 21:43:29 +00:00
Colin Caine
8d771e578c completions 1 2017-11-22 21:30:37 +00:00
Koushien
f982233a49 completions: initial implementation
This commit squashes a load of work by @Koushien, a dozen hours from
@cmcaine and some CSS by @bovine3dom.

@cmcaine is writing this commit message, but the work was mostly by
Koushien so the author is set to them. Thanks Koushien!

The following issues need to be fixed:

 - The interface is over complicated (my fault)
 - commandline_frame is hard-coded to use BufferCompletionSource. This
   needs to be made more general
 - BufferCompletionSource should be generalised
 - completions.ts calls helper functions in commandline_frame. Should
   just use browser proxy. If that's too slow can define a
   completions_background.ts

After that's done, this should be fixed:

 - Completion hiding/unhiding is currently too messy.
2017-11-22 21:30:37 +00:00
Oliver Blanthorn
ea697464b3
Add text yank mode 2017-11-22 20:47:35 +00:00