Commit graph

513 commits

Author SHA1 Message Date
Oliver Blanthorn
7574146e65
Merge branch 'master' of github.com:cmcaine/tridactyl into glacambre-fix_completions_not_looping 2017-11-30 19:15:42 +00:00
Oliver Blanthorn
4ad4291b7f
Fix initial shift-tab skipping an item 2017-11-30 19:15:34 +00:00
Oliver Blanthorn
a13cb900a7
Merge branch 'master' of github.com:cmcaine/tridactyl into glacambre-fix_bugzilla_yankshort 2017-11-30 18:20:33 +00:00
glacambre
d6bf2f4c69 src/completions.ts: Fix shift-tab not looping backwards. 2017-11-30 19:03:12 +01:00
glacambre
469bc551ee src/excmds.ts: Fix yankshort not always yanking short urls.
Problem: Yankshort didn't yank short urls on bugzilla.mozilla.org. This
was due to bugzilla.mozilla.org using an old, non-standard, non-html5
compliant way of advertising its short urls.

Solution: Make yankshort check if a rev="canonical" link exists if it
cannot find a rel="shortlink" url.

Fixes issue https://github.com/cmcaine/tridactyl/issues/172 .
2017-11-30 18:04:16 +01:00
Oliver Blanthorn
9fc0e9c0cf
Fix #167: Add bmarks command for searching through bookmarks 2017-11-30 17:02:31 +00:00
Oliver Blanthorn
8695552fe6
Fix #168: some pages didn't like the htmlblah strings. 2017-11-30 15:35:37 +00:00
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
Oliver Blanthorn
b07180a37e
Merge branch 'master' of github.com:cmcaine/tridactyl into johnbeard-hintread 2017-11-30 11:06:26 +00:00
Oliver Blanthorn
d9fc24dc62
Merge branch 'master' of github.com:cmcaine/tridactyl into glacambre-fix_pcgamer_hints 2017-11-30 08:58:45 +00:00
glacambre
24632c8dfb src/dom.ts: Fix hints not being displayed on certain sites.
Problem: Hints aren't displayed for certain elements. This was because
the isVisible function didn't pay attention to the element's 'display'
attribute when deciding whether an element is visible according to its
height/width.

Solution: Add two functions to help decide whether the height and width
attribute of an element matter.

Note: The two functions do not do anything if an element's 'display'
attribute is set to either 'initial' or 'inherit' because taking these
into account seems complicated.

Fixes issue https://github.com/cmcaine/tridactyl/issues/127 .
2017-11-30 05:47:18 +01: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
Colin Caine
51d7258273 completions: improve css
Stop long titles appearing after URLs
2017-11-30 00:24:00 +00:00
Colin Caine
7334777714 completions: backport improved history 2017-11-29 23:56:54 +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
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
6cd93b233d
Allow ;p to yank any element which contains text 2017-11-29 12:09:37 +00:00
Oliver Blanthorn
3c282ab1df
Merge branch 'master' of github.com:cmcaine/tridactyl into johnbeard-hintanchor 2017-11-29 11:47:50 +00:00
Oliver Blanthorn
e42a173762
Revert to Vimperator colours, reduce opacity 2017-11-29 11:33:33 +00:00
John Beard
dc7b5717db Hint CSS: make easier to see stacked hints
This has two major aspects:

 - Add a border so the extent of a hint is clear
 - Make hint BG translucent, so stacked hints can be discerned

 Also used more Tango-ish colours to soften the intense yellow.
2017-11-29 03:03:58 +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
2be3646b21 release 1.6.1 2017-11-28 18:37:39 +00:00
Colin Caine
4a271805bb build: BSD compatibility for git_version.sh 2017-11-28 17:36:40 +00:00
Colin Caine
3cae9a5334 Revert "excmd: fix :version"
This reverts commit baa5a9b861.
2017-11-28 17:23:16 +00:00
Colin Caine
4a3a25751c hinting: Fix #136.
Hints still don't work for images, but I don't see any way we can detect that they're clickable, besides special casing instagram.
2017-11-28 17:19:50 +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
c255d1a2e9
Fix #151: version is now Colin-proof and does not rely on tags 2017-11-28 14:17:51 +00:00
Oliver Blanthorn
758c91a5f4
Fix #150: tab{next,prev} now wrap again 2017-11-28 13:53:22 +00:00
Colin Caine
4e9355e5ce build: Helper for stable releases 2017-11-28 02:52:10 +00:00
Colin Caine
074393332f release 1.6.0
New features:

 - auto-completion for `:open`, `:tabopen`, etc.
 - Tab selects autocompletion options
 - New hint modes!
	;i - open image
	;I - open image in new tab
	;; - focus
 - Better commandline history completion (substring matching!)
 - Better completion for `:buffer`, `:tabmove`, etc.
 - Focus inputs
 	gi -- last input
	focusinput -p -- first password input
	focusinput -b -- largest input
 - Better documentation!
 - More search URLs
 - Yank the short or canonical link (see :help clipboard)

Contributors to this release:

John Beard
 - Image hinting
 - Focus input

Olie Blanthorn
 - Both types of history completion
 - Merging a bunch of PRs
 - Some documentation

Colin Caine
 - Improved buffer completion
 - Documentation

Olle Fredriksson
 - Make searches including hashes work.

Jake Beazley
 - CSS

@chocolateboy
 - Improved pagination [[,]]

@glacambre
 - More search URLs

Robbie McMichael
 - Fix build for BSD sed (OSX)
 - tabfirst, tablast

emanresusername
 - Select more elements in hints
2017-11-28 02:45:28 +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