Commit graph

832 commits

Author SHA1 Message Date
glacambre
67e95a87d7
excmds.ts: export forceURI function 2018-03-03 09:56:05 +01:00
Colin Caine
fdbf132f4e release 1.8.0 2018-03-02 17:28:23 +00:00
Colin Caine
1bf859bb01 Fix #321 2018-03-02 17:26:40 +00:00
glacambre
3cd0125783
hinting.ts: Make hintPage follow link if there's only 1 option 2018-02-28 22:01:36 +01:00
glacambre
ec6226b1e4
excmds.ts: Fix scrollpx not working on some websites 2018-02-27 22:30:58 +01:00
Colin Caine
e122caa326 Be more careful with truthy values 2018-02-19 16:17:57 +00:00
Colin Caine
7e7528746b Fix unbind 2018-02-19 15:59:56 +00:00
Colin Caine
188ea0b39b followpage now falls back to urlincrement 2018-02-19 01:34:15 +00:00
Colin Caine
55e2d463ac Don't try to show bind for empty key 2018-02-19 01:23:21 +00:00
Colin Caine
3218b9157e Improve feedback on bind, get
Now these commands populate the commandline. It's pretty rubbish that we
don't have a messaging system yet, but this is better than nothing.
2018-02-19 01:18:48 +00:00
Colin Caine
ce480c6de6 Fix unset for new config system
Thanks Lexi for bugreport.
2018-02-19 00:37:42 +00:00
Colin Caine
8a500bbf92 Blur iframe after clipboard actions 2018-02-19 00:15:44 +00:00
Colin Caine
ff7eccdc54 Move commandline iframe out of body as well 2018-02-18 22:55:17 +00:00
Colin Caine
5937ee284b Fix #288 2018-02-18 22:22:47 +00:00
Colin Caine
58d38a9f70 Support changing followpage pattern 2018-02-18 18:23:40 +00:00
Colin Caine
3ba21592cc Simplify findRelLink 2018-02-18 18:21:59 +00:00
Colin Caine
259e4f182f Make tab opening behaviour more consistent 2018-02-18 16:08:19 +00:00
Colin Caine
b9292cd25e Typo: fix #310
Testing is hard.
2018-02-14 17:38:09 +00:00
Oliver Blanthorn
5d3dff568e
Merge pull request #306 from johnbeard/floating-iframes
Fix floating commandline iframe on some sites #289
2018-02-14 09:01:46 +00:00
Oliver Blanthorn
94184b2839
Merge pull request #305 from johnbeard/readme
Expand readme with most common normal bindings
2018-02-14 08:42:17 +00:00
John Beard
309dafaa7b Fix floating commandline iframe on some sites #289
This is caused (at least in this instance) by sites setting a CSS
min-height rule for `iframe` elements, which is then applied to the
Tridactyl iframe too.

Fix this by adding `min-height: 0` to the CSS for `#cmdline_iframe`.
Because this is an ID, it will always have higher specificity than any
CSS the site sets (unless we collide the ID, maybe), so it doesn't need
important.

Also add `max-height: none` in case anyone tries to cramp our iframe
style.

Perhaps there will be more styles that can mess up the iframe styling
but this seems to fix all the sites reported in #289 and #282. Using
cleanslate might help if it turns out there are very many more ways for
the outer site to ruin our day, but since it's only the iframe that the
site CSS can touch (inner HTML is safe), maybe this will be enough and
save a lot of !important'ing.
2018-02-14 01:15:06 +00:00
John Beard
7a65c2af47 Expand readme with most common normal bindings
This provides a quick-look overview of a good percentage of Tridactyl's
basic commands to potential users looking at project page.
2018-02-14 00:15:31 +00:00
Colin Caine
092e501db4 src: Simplify HintState constructor 2018-02-13 23:57:29 +00:00
Colin Caine
128080fed2 src: Fix vimperator-reflow hintfilter 2018-02-13 23:56:37 +00:00
Colin Caine
4884e0d6bb src: Truncate long hint text 2018-02-13 23:28:04 +00:00
Colin Caine
772da93894 src: simplify hintnames 2018-02-13 23:14:20 +00:00
Colin Caine
1b8e8d6a39 src: Enhance itertools 2018-02-13 23:10:36 +00:00
Saul Reynolds-Haertle
b53de98903 escape hintchar regex in hint building for vimperator hintfiltermode 2018-02-13 23:08:53 +00:00
Saul Reynolds-Haertle
3231852dab Code quality: replace if-else blocks with switches 2018-02-13 23:08:53 +00:00
Saul Reynolds-Haertle
335d4bb167 Default hint build/filter is a function instead of a const dict 2018-02-13 23:08:53 +00:00
Saul Reynolds-Haertle
fcbda44a4f Unify code for 'vimperator' and 'vimperator-reflow' hintfiltermodes 2018-02-13 23:08:53 +00:00
Saul Reynolds-Haertle
282766ed1e Add vimperator-reflow hint filter mode
This mode works like vimperator-mode, but additionally renames hints
as they're filtered.
2018-02-13 23:08:53 +00:00
Saul Reynolds-Haertle
30d6dd1c2f Add hintmode config and new "vimperator" hinting mode
hintmode = "simple" is the default hinting mode, naming hints using
the hintchars configuration. It is the current tridactyl behavior and
is preserved unchanged.

hintmode = "vimperator" is a new hinting mode that allows the user to
filter hints using non-hintchar :alnum: characters. Hints with targets
whose html does not contain these characters as a subsequence (not
contiguous) will be filtered out.
2018-02-13 23:08:53 +00:00
Oliver Blanthorn
c17878098d
Merge branch 'master' of github.com:cmcaine/tridactyl into aucmd 2018-02-02 15:00:10 +00:00
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
7a22bc8c2c Stop testing on pre-commit 2018-02-02 13:23:27 +00:00
Colin Caine
083600750b Fix bug typo in setDeepProperty 2018-02-02 13:11:23 +00:00
Oliver Blanthorn
2174224244
Rename setnew to set, correct order for set in autocmds, ensure people cannot wipe entire config with unset 2018-02-02 13:06:30 +00:00
Colin Caine
c1ab1ebae9 Remove superfluous variable 2018-02-02 13:05:40 +00:00
John Beard
e50119d466 Use new UrlUtil interpolate function in excmd
Document user-facing interpolation behaviour on excmd
`searchsetkeyword`.
2018-02-02 11:56:01 +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
John Beard
feda3bc8e6 Add URL interpolation function and tests
This includes logic to automatically percent-encode the query if it
occurs in the the query string of the URL pattern.

If this automatic logic is not enough in future, the same function can
be extended with an explicit encoding flag as needed.
2018-02-01 16:43:13 +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
Oliver Blanthorn
9304dee31e
Merge pull request #298 from johnbeard/urlmodify-doc
Urlmodify documentation
2018-01-28 20:30:52 +00:00
John Beard
931fa12bd7 Expand urlmodify docs with prose and examples 2018-01-28 20:10:52 +00:00
John Beard
b2a31b9b72 Fix incorrectly quoted regex in urlmodify -r 2018-01-28 19:39:29 +00:00
Colin Caine
d16cbb980b Merge: Support excmd aliases via command
Merge remote-tracking branch 'isaackhor/i236-common-ex-aliases'
2018-01-28 18:19:20 +00:00
Colin Caine
0f40e19035 Revise alias expansion
Simplify alias interface to one function.

Enable aliases that expand to multiple words.
2018-01-28 18:13:21 +00:00
Colin Caine
d588e364f2 Fix typo in command 2018-01-28 17:57:46 +00:00