Commit graph

801 commits

Author SHA1 Message Date
glacambre
3c9c3867e2
TSLint: re-enable forin rule
The forin rule forbids using the `for (let key in object)` syntax. This
is because iterating with `for in` also iterates over keys obtained from
prototypal inheritance. This is most of the time wrong and using `for
(let key of Object.keys(object)` protects against that.
2019-04-02 18:17:12 +02:00
glacambre
8545efdf3f
TSLint: re-enable comment-format rule
This rule requires that all single line comments must start with a
space, i.e. `//hello` is forbidden and `// hello` is allowed.
This made me discover a few pre-processor macro in files that aren't
taken into account by the macro-preprocessor and so I've decided to
remove these directives.
Note that this rule must stay disabled for excmds.ts as it would break
our preprocessor macros.
2019-04-02 06:38:59 +02:00
glacambre
f11f5481e2
TSLint: re-enable bool-param-default rule
The bool-param-default rule requires all optional boolean parameters to
have a default value.
2019-04-01 18:06:13 +02:00
glacambre
8ed07362e0
TSLint: re-enable ban-types rule
This rule disallows using Number, String or Boolean constructors as
types and instead forces using the actual type, `number`, `string` or
`boolean`.
2019-04-01 12:57:19 +02:00
glacambre
f5563c3d3e
TSLint: re-activate array-type rule
This rule stipulates that complex array types should be represented as
Array<T> rather than T[].
2019-04-01 05:28:21 +02:00
glacambre
b2e88f8a02
Fix :winopen -private about:addons not working 2019-03-26 08:27:38 +01:00
Oliver Blanthorn
1f12c31615
Merge pull request #1414 from glacambre/fix_editor_doc
Fix editor documentation
2019-03-25 13:30:19 +00:00
glacambre
018c247dae
Fix editor documentation
You shouldn't single-quote values you give to editorcmd.

Closes #1413.
2019-03-25 05:21:00 +01:00
Colin Caine
618f7f6446 excmds: document composite 2019-03-12 23:45:08 +00:00
Oliver Blanthorn
4d3b86f5ee
Merge branch 'remove_commandline_background' 2019-03-12 15:15:58 +00:00
glacambre
6a4e2e3c41
excmds.ts: Fix nativeopen using wrong escaping scheme on windows
See comment in patch for explanations.
2019-03-06 06:49:47 +01:00
glacambre
bdd3e04199
Implement deselect_completion ex command
Left unbound by default.
2019-02-28 18:27:21 +01:00
glacambre
4ff992f49e
excmds.ts: Fix hint -j
https://github.com/tridactyl/tridactyl/pull/1381 inverted the behavior
of -J. This commit fixes that.
2019-02-27 06:17:15 +01:00
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