Commit graph

86 commits

Author SHA1 Message Date
Oliver Blanthorn
a1cc6ade8f
Add event type checking to autocmd, change default autocmd 2018-02-02 14:53:58 +00:00
Oliver Blanthorn
5b6b473af3
Fix getAsync, add au alias, fix loadaucmds 2018-02-02 14:12:47 +00:00
Colin Caine
083600750b Fix bug typo in setDeepProperty 2018-02-02 13:11:23 +00:00
Colin Caine
ca19b87807 Improve config API
- set, unset, get now all support an arbitrary depth of keys
 - set has a less confusing argument order
 - getAsync added: it will sleep until the config is read from disk for
   the first time

Config isn't really fit for purpose. Should consider custom objects (for
recording type, defaults, etc) and maybe decoupling internal
representation from UI.

Found a couple of bugs as well:

   excmds.ts: set() Could write a string to the config where the config
              expected an array (Fixes #275)
   config.ts: If both sync and local storage are in use the behaviour is
              not intuitive.
2018-02-01 23:45:45 +00:00
Oliver Blanthorn
5f9bd063c2
First attempt at aucmds. Main issue - config does not seem to load userconfig, only defaults 2018-01-31 19:51:08 +00:00
Colin Caine
0693cdc45d Merge remote-tracking branch 'origin/master' into HEAD 2018-01-28 15:04:47 +00:00
Oliver Blanthorn
a351d3d285
Fix #262: delete exemplar binding 2017-12-31 17:26:00 +00:00
Isaac Khor
2441fba8c0 Merge branch 'master' into i236-common-ex-aliases 2017-12-31 16:57:57 +08:00
Isaac Khor
29d58cd571 Change from 'alias' to 'command' and access config options differently 2017-12-31 16:53:35 +08:00
Colin Caine
f398895dce logging: introduce convenience functions 2017-12-29 23:58:23 +00:00
John Beard
baefd09973 Allow levelled logging for debug
This is useful for suppressing spew, but still allowing easy debugging
when needed, without rebuilding.

To use, use excmd:

     setlogginglevel <prefix> <level>

Where the level is one of:

    - never:  never log
    - error
    - warning
    - info
    - debug:  most verbose

Output is directed to console methods "error", "warn", "log", "debug".
2017-12-29 18:57:16 +00:00
Isaac Khor
baf078572f Merge remote-tracking branch 'upstream/master' into i236-common-ex-aliases 2017-12-27 18:19:53 +08:00
Isaac Khor
e1106181ae Add basic aliases (mostly copied from pentadactyl and vim) to config 2017-12-27 18:03:13 +08:00
John Beard
fde956df53 Add save link/img hint submode (;s, ;S, ;a, ;A)
This adds the ability to save link targets or images. The save location
can be default, or the save as dialog can be invoked.

Somewhat sensible default filenames are provided.

Data URLs are also supported (though they need quite a bit of massaging
to get past the WebExt security limitations). Specificially, they need
to be round-tripped though a Blob, and must be saved from the background
context.
2017-12-24 11:20:26 +00:00
John Beard
080d6df9a3 Add hint kill submode (;k)
This submode deletes the selected hinted item. Useful for removing
overlay blockers or even unwanted/annoying content.
2017-12-17 17:39:54 +00:00
Koushien
850104e0fe Implement ^,$ navigating to 0%,100% in x-direction
This is made possible by also allowing the second
argument to be "x" or "y". We supply "y" as the
default to retain the current, more commonly
desired behavior.
2017-12-11 01:19:20 +00:00
glacambre
e61358b63f src/{config,controller,excmds,state}.ts: Implement dot repeat. 2017-12-06 16:31:53 +00:00
Oliver Blanthorn
001fb17bd2
Fix set newtab failing to set newtab 2017-12-06 14:59:00 +00:00
Colin Caine
dcc816ff86 Clean up inputmode
Code quality, introduce config option.
2017-12-05 22:13:08 +00:00
Colin Caine
79a2f5ce54 config: Make unset take effect on loaded pages
Previously required a page reload.
2017-12-05 22:09:49 +00:00
Oliver Blanthorn
c8dc8387cf
Add relative zoom and z{i,z,o} binds 2017-12-04 11:50:35 +00:00
Oliver Blanthorn
9dd2555984
Merge branch 'master' of github.com:cmcaine/tridactyl into orangenschalen-variable_hintname_length 2017-12-03 13:56:10 +00:00
Oliver Blanthorn
8fa42bc442
Remove now disused hintorder setting 2017-12-03 13:55:56 +00:00
Oliver Blanthorn
aea3241c28
Fix #198: add Qwant and update startpage URL 2017-12-03 13:01:23 +00:00
Oliver Blanthorn
ddb2004314
Add Google Scholar search engine 2017-12-03 12:10:25 +00:00
Oliver Blanthorn
11b208c2a2
Fix #194: add searchsetkeyword [keyword] [url]
Also, add config to the `tri` namespace for debugging.
2017-12-03 11:30:44 +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
19d03e66b3
Fix bug where some settings would not change until page reload 2017-11-29 21:48:46 +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