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
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.
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
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
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
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.