Commit graph

988 commits

Author SHA1 Message Date
glacambre
85b3e33719
Remove commandline_background
This commit removes commandline_background.ts. I believe this is useful
because the only thing it did was provide recvExStr, which just
triggered a synthetic "onLine" event the only consumer of which was the
parser. Since we already used controller_background + acceptExCmd in
some places, it made sense to me to directly use controller_background +
acceptExCmd everywhere.
2019-02-26 08:41:19 +01:00
glacambre
295471d592
excmds.ts: Fix hint -pipe not working
https://github.com/tridactyl/tridactyl/pull/1381 broke `hint -pipe`
(just try `:composite hint -pipe a href | tabopen` for example).
This commit makes `-pipe` work again.
2019-02-26 06:24:18 +01:00
Oliver Blanthorn
026f409add
Merge pull request #1381 from nfvs/hint_t
Added `hint -t`, `hint -tc` and `hint -Jtc`, to open links in a new tab.
2019-02-24 14:03:11 +00:00
Nuno Santos
31c1d52641 Added hint -t, hint -tc and hint -Jtc, to open links in a new tab.
Using `-w newtab` wouldn't allow us to use selectors with `-c`, and
using composite would always open a new empty tab on cancel (esc).

Other changes:
- Better flag handling in hint().
- `-c` is now a flag (can be combined with others like `-t`), and is
handled in the `default` case
- support flags `-c`, `-J` and `-t` in any position
2019-02-23 23:08:26 +01:00
glacambre
02c133fa0b
native.ts: implement proper profile-checking
https://github.com/tridactyl/tridactyl/pull/1355 introduced a bug on
systems where profile names do not match profile paths. Fixing it
required implementing proper profiles.ini parsing, which should help
making profile discovery work on windows.

The new getProfileDir() function breaks compatibility with previous
versions. The previous version turned backslashes into slashes on
windows. I believe doing this is wrong since paths such as
`C:/Users/Bob` do not make any sense on windows. They might work in
mingw and wsl but I believe we should aim to have everything work on
'normal' windows.
2019-02-23 14:22:49 +01:00
Oliver Blanthorn
b6417355e0
Merge pull request #1363 from glacambre/content_editor
Content editor
2019-02-20 07:55:57 +00:00
glacambre
755e42bb9a
excmds.ts: Move :editor to the content script
Having `:editor` in the background script and constantly messaging the
content one to update the page doesn't really make sense. This commit
moves `:editor` to the content script and thus simplifies the code a
little bit.
2019-02-20 07:09:32 +01:00
glacambre
68a8fccb50
Mobe background/native_background.ts to lib/native.ts
All functions in native_background.ts use browserBg in order to interact
with the native messenger. This means that these functions can also be
used in the content script. This means that there's no point in keeping
these functions in the background/ folder and that there's no point in
having a native_background message type.
2019-02-20 07:09:01 +01:00
Manny Schneck
862fd2de94 feat/minor: add hint that scrolls element to the top of a page 2019-02-19 10:49:19 -06:00
Rodrigo
463593b22e
Fix path to tutor page 2019-02-18 16:11:45 +01:00
Robert Günzler
f2541e4de9 Add -popup option to winopen excmd
Opens the new window as a popup without the usual browser UI.
This can be combined with -private in any order.

Resolves #1357
2019-02-16 13:56:37 +01:00
glacambre
3c9fc84f6d
nativeopen: detect profile, enable space in URLs
This commit does two things:
- If the user didn't specify any arguments, try to detect what profile
  is currently being used and specify it in the command passed to
  firefox. This makes sure tabs opened with `:nativeopen` are opened
  with the right profile if multiple firefox profiles are running.
- Quote url argument to enable adding spaces and quotes to the URL
  (closes #555)
2019-02-13 07:51:42 +01:00
heshamsafi
e0545aca65
native_background.ts: Fix terminator not working as editorcmd
There were two problems: first, the format string used by terminator and
termite was wrong: tuicmd was appended after "%f", which resulted in
tridactyl telling the emulator to execute the file rather than the
tuicmd.
The second issue was that, as mentionned in
https://github.com/tridactyl/tridactyl/issues/1346, `-u` was missing
from terminator's options.
2019-02-11 05:15:16 +01:00
Oliver Blanthorn
7db70f1393
Merge pull request #1335 from glacambre/fix_findnext
Fix findnext
2019-02-08 13:31:33 +00:00
glacambre
002de8a2ca
excmds.ts: Add flags to :help
These flags are -a, -b, -e, -s and can be used to help Tridactyl know
what it should jump to in case of conflicts (e.g. when there's an `h`
binding and an `h` alias).
2019-02-08 07:40:24 +01:00
glacambre
6a5fdefcd9
Make findnext default to global previous search if needed 2019-02-07 08:33:30 +01:00
glacambre
b4a50328ba
Make findnext default to 1 and display messages on errors 2019-02-07 07:52:47 +01:00
Oliver Blanthorn
469159d862
Merge branch 'add_searchengine_support' 2019-02-06 15:26:09 +00:00
Oliver Blanthorn
26701e4069
Merge branch 'pinusc-master' 2019-02-06 15:22:45 +00:00
Oliver Blanthorn
883f951e8c
Improve shadow-bind error message 2019-02-06 15:21:58 +00:00
pinusc
4070aa0167 Warn when adding a binding that is shadowed by other bind (#1309) 2019-02-05 16:41:53 +01:00
glacambre
5743f0ce7d
excmds.ts: uncomment run_exstr
Closes https://github.com/tridactyl/tridactyl/issues/1275
2019-02-05 08:27:59 +01:00
glacambre
e9945e49b6
excmds.ts: Use loadReplace where possible
Loadreplace will make openInTab() replace the current url in history if
possible. This is useful for winopen and tabopen as this will remove
Tridactyl's newtab page from history.
2019-02-04 18:43:16 +01:00
glacambre
d05b7ef039
excmds.ts: Add :searchsetkeyword back with an error message 2019-02-04 18:39:43 +01:00
glacambre
186c1a9904
excmds.ts: Remove setsearchkeyword and forceURI functions
setsearchkeyword has been deprecated for a while now and it was the last
place where forceURI was used.
It doesn't make sense to keep forceURI because using it for its intended
purpose (opening new tabs/windows) would make Tridactyl inconsistent:
while openInTab() is able to use Firefox's search engines, forceURI
isn't and search engine usage can't be added to forceURI due to API
mismatches.
2019-02-04 08:22:48 +01:00
glacambre
db5461e513
excmds.ts: Make open_quiet use openInNewTab() 2019-02-04 08:18:01 +01:00
glacambre
7c26cf8f9c
excmds.ts: Remove nativeopen checks from winopen
These checks are performed in nativeopen anyway.
2019-02-04 08:00:51 +01:00
glacambre
c0bbdcb536
excmds.ts: Make winopen use openInTab 2019-02-04 07:58:10 +01:00
Oliver Blanthorn
de954ddc9c
Merge branch 'guiset_statuspanel' 2019-02-03 15:45:23 +00:00
Oliver Blanthorn
fb4b78cbe4
Add missing backtick 2019-02-03 15:45:11 +00:00
Oliver Blanthorn
69a1c1a88d
Merge pull request #1310 from glacambre/mention_disable
excmds.ts: use word "disable" in mode/blacklistadd doc
2019-02-03 10:48:49 +00:00
glacambre
536dcb3abc
css_utils.ts: Add statuspanel rule
Related issue: https://github.com/tridactyl/tridactyl/issues/1284#issuecomment-459488419
2019-02-03 08:55:40 +01:00
glacambre
e108cbce7d
excmds.ts: use word "disable" in mode/blacklistadd
As mentionned in https://github.com/tridactyl/tridactyl/issues/339, this
could be useful for users looking for the word 'disable' in the help
pages.
2019-02-03 06:22:53 +01:00
Oliver Blanthorn
a1186fbd79
Merge pull request #1301 from Rahlir/jshinting
Option to disable javascript hinting
2019-02-02 17:38:17 +00:00
glacambre
3e78e2bcf9
Implement winclose and winclose completions
Winclose was already there but was much less useful (could only close
the current window). This commit enables closing other windows and
provides completions for it.

Related issue: https://github.com/tridactyl/tridactyl/issues/794.
2019-01-31 08:13:05 +01:00
Oliver Blanthorn
1b29ad5751
Fix #1229: don't change titlebar with guiset 2019-01-30 17:02:02 +00:00
glacambre
46236eab3c
Mention troubleshooting guide in newtab/help page
Closes https://github.com/tridactyl/tridactyl/issues/824.
2019-01-30 06:10:32 +01:00
Tadeas Uhlir
24f2156963 Update doc example for -Jc option 2019-01-29 15:03:58 -05:00
Tadeas Uhlir
c0724f2f04 Add example to docs for hint -Jc command 2019-01-29 14:44:07 -05:00
Tadeas Uhlir
8dc07f785e Change -j option to -J and fix option parsing
This will fix the issue regarding -qJ and -Jq option order. It is not
the prettiest solution but it does the work. Once there is a proper
option parser, there will be nicer way to do this.
2019-01-29 14:38:39 -05:00
Tadeas Uhlir
3fe97c5d53 Update of documentation 2019-01-29 14:36:49 -05:00
Tadeas Uhlir
5d4f6b493f Add option -j in excmds hint() which disables javascript hinting
To make this work I added jshints argument in the pipe() function in
hinting.ts file. This argument is set to true as default to preserve the
original intent of allowing javascript hinting in most cases.
2019-01-29 14:36:49 -05:00
Oliver Blanthorn
76a707bb1f
Minor doc fixes 2019-01-28 16:32:07 +00:00
Oliver Blanthorn
2c4b41f24c
Merge pull request #1307 from glacambre/fix_1298
Fix :editor failing to remove TridactylEditing class on failure
2019-01-28 16:09:39 +00:00
glacambre
4d0d34127b
Remove userChrome-minimal.css
As mentioned in https://github.com/tridactyl/tridactyl/issues/1229, this
userChrome file isn't kept up to date. It's probably better to remove it
and only support modifying the userChrome with `:guiset`, which is
slightly more tested.
2019-01-28 07:32:09 +01:00
glacambre
17bff13d37
Fix :editor failing to remove TridactylEditing class on failure
Before this commit, if Tridactyl failed to execute :editor (e.g. because
editorcmd isn't defined), the edited element would keep its
TridactylEditing class.

Closes https://github.com/tridactyl/tridactyl/issues/1298
2019-01-28 07:13:25 +01:00
glacambre
ea257f3644
Add searchengine support
This commit adds searchengine support to tridactyl. Avoiding code
duplication between open and tabopen required changing the way tabopen
works: first, it opens a new tab pointing to Tridactyl's newtab page and
only after that does it actually navigate to where the user wants.
2019-01-27 13:04:51 +01:00
Oliver Blanthorn
ba0dea0349
Merge branch 'make_find_faster' 2019-01-22 15:44:48 +00:00
Oliver Blanthorn
5d91d29c01
Polish find mode for release 2019-01-22 15:26:15 +00:00
glacambre
08b8ff7bb4
excmds.ts: Fix nativeopen not doing proper checks or cleaning up
Before this commit, Tridactyl checked if `nativeopen` was currently
supported in `tabopen` rather than in nativeopen itself. This was a
problem because nothing prevented a user from manually calling
`:nativeopen`. The check has been moved to `nativeopen`.
Another issue was that in case of failure, Tridactyl wouldn't properly
clean up event handlers created in nativeopen. This would result in new
tabs being moved to surprising indexes. This wasn't a big deal because
said event handlers removed themselves after executing once but it'd
still result in a bug. This has been fixed too.
2019-01-22 07:06:53 +01:00