Commit graph

2129 commits

Author SHA1 Message Date
Oliver Blanthorn
cd2f964136
Merge pull request #1194 from glacambre/fix_1193
config.ts: Fix getURL not merging site-specific config objects
2018-11-26 11:57:05 +00:00
Oliver Blanthorn
cbfcf94c45
Merge pull request #1195 from keegancsmith/mac
scripts: Use different flags for sed and base64 on Mac
2018-11-26 11:54:49 +00:00
Keegan Carruthers-Smith
74a52a61eb scripts: Use different flags for sed and base64 on Mac
sed and base64 have different flags on darwin (and possibly other
BSDs). Alternatively we could encourage the user to install coreutils and use
gsed and gbase64.
2018-11-26 11:45:48 +02:00
glacambre
57afbfedac
config.ts: Fix getURL not merging site-specific config objects
https://github.com/tridactyl/tridactyl/issues/1193 happened because
before this commit, getURL did not merge objects from different
site-specific configs. This means that if a user had the following site
specific configs:

"example": {
        "priority": 1,
        "nmaps": {
                "a": "js alert('')"
        },
}
"example.org": {
        "priority": 2,
        "nmaps": {}
}

A call to config.getURL("example.org", ["nmaps"]) resulted in the empty
object from the "example.org" config being returned and the mappings for
"example" to be ignored. This obviously is not the desired behavior.

This is fixed by mergeDeep()'ing objects found in matching site-specific
configs.

Closes #1193.
2018-11-25 19:06:17 +01:00
Oliver Blanthorn
abbdd09b70
Fix broken link to tutorial on new tab page 2018-11-23 19:48:52 +00:00
Oliver Blanthorn
2a520a3b2a
Merge pull request #1187 from glacambre/singleton_types
Metadata Types: Use a single type instance where it makes sense
2018-11-21 13:06:56 +00:00
glacambre
a808e9e742
Metadata Types: Use a single type instance where it makes sense
One of the possible problems of #1184 (firefox freezing periodically
with Tridactyl enabled) is that Tridactyl uses too much RAM, which could
cause Firefox to attempt to GC it from time to time.
One easy optimisation to try to reduce this problem is to use singletons
for metadata when possible (VoidType, AnyType...).
According to my measurements, this saves the allocation of 933 objects,
which amounted to ~0.03MB. Multiply this by 40 tabs and you get about
1.20MB saved, the space of a whole 1980-era floppy disk.
2018-11-21 06:56:01 +01:00
Oliver Blanthorn
7e21d64025
Fix broken completions 2018-11-20 20:16:07 +00:00
Oliver Blanthorn
f650dfd557
Merge pull request #1186 from ntc2/master
[docs] Explain `bind` example
2018-11-20 19:48:19 +00:00
Nathan Collins
d887ddcaca [docs] Improve formatting, add example
Some of the lists were not formatted as lists and so rendered
poorly.
2018-11-20 11:23:34 -08:00
Nathan Collins
033c7f7597 [docs] Explain bind example
The most complicated example in the bind docs is exactly what I was
trying to setup, but I didn't understand what it did when I first saw
it.
2018-11-20 10:45:30 -08:00
Oliver Blanthorn
f53375f474
Merge pull request #1183 from glacambre/s_buffer_tab_
Rename buffers to tabs
2018-11-19 18:27:34 +00:00
glacambre
2ed20bf47f
{excmds,config}.ts: Turn tab{first,last} into aliases
Closes #1171.
2018-11-19 18:38:33 +01:00
glacambre
c412c8dad0
Rename buffers to tabs
Note: The CSS class names are kept as they were, see #1183 for more
information.
2018-11-19 18:35:37 +01:00
Oliver Blanthorn
cda87cdb30
Merge pull request #1182 from glacambre/fix_1165
Fix 1165
2018-11-18 14:45:12 +00:00
glacambre
2ad7d4a9fb
commandline_content.ts: Fix cmdline not being inserted in non-html pages
This commit fixes the command line not appearing on
https://www.haiku-os.org/docs/HIG/index.xml. The problem was that
document.createElement uses the namespace of the current document, which
for the haiku-os page was a docbook namespace. This caused the created
iframe to have default docbook attributes and none of the regular html
ones (e.g. contentWindow).

Closes https://github.com/tridactyl/tridactyl/issues/1165 .
2018-11-18 14:28:33 +01:00
glacambre
d916d16d85
scrolling.ts: Fix Tridactyl failing to scroll on non-html pages
The reason Tridactyl was unable to scroll on
https://www.haiku-os.org/docs/HIG/index.xml is that when it tried to set
this.elem.style.scrollBehavior to "unset", an exception was thrown
because non-html elements do not have a style attribute.

This is fixed by making sure the attempt to change scrollBehavior is
only performed if the element has a style attribute.
2018-11-18 13:31:52 +01:00
Oliver Blanthorn
81edae56d2
Server is back up 2018-11-17 12:23:44 +00:00
Oliver Blanthorn
12408ce2a4
Let people know about downtime 2018-11-17 11:27:56 +00:00
Oliver Blanthorn
704e1e572d
Merge pull request #1177 from glacambre/fix_aboutpreferences_link
manifest.json: Update about:preferences link
2018-11-16 23:36:53 +00:00
glacambre
9bf5ad1cc5
Update doc links
Issue #1176 was introduced in #1026. It should have been fixed in #1157
but slipped through the cracks. It made me realize that a few other
links were broken and so I fixed them.

Closes #1176.
2018-11-16 19:52:50 +01:00
Oliver Blanthorn
70bb182107
Merge pull request #1168 from glacambre/fix_1167
commandline_frame.ts: Make sure activeCompletions is defined
2018-11-14 11:17:29 +00:00
glacambre
8d9795a19b
commandline_frame.ts: Make sure activeCompletions is defined
This is a temporary fix for
https://github.com/tridactyl/tridactyl/issues/1167 . I couldn't find
where this issue might come from and since there are no reproduction
steps this will have to do.

I plan on modeling Tridactyl in TLA+ when I have time in order to find
out where our hard-to-reproduce bugs come from. Hopefully this bug will
be among them.

Closes #1167.
2018-11-13 18:35:11 +01:00
Oliver Blanthorn
c3bdc91ba5
Merge pull request #1166 from glacambre/better_set_error_messages
UnionType.ts: Improve error message on failed conversions.
2018-11-12 18:40:54 +00:00
glacambre
dfbae7ed06
UnionType.ts: Improve error message on failed conversions.
Closes https://github.com/tridactyl/tridactyl/issues/1146.
2018-11-12 19:10:54 +01:00
Oliver Blanthorn
7c690d460a
Merge pull request #1164 from glacambre/pale3_xselpaste
Pale3 xselpaste
2018-11-10 17:10:35 +00:00
pale3
3cf0307945
xselpaste: allow primary select paste using <S-Insert>
currently it only works on web pages and not within commandline! Cos
windows platform dosn't have primary selection, execution of <S-Insert> will silently fail
2018-11-10 17:24:23 +01:00
Oliver Blanthorn
29c0449711
Merge pull request #1162 from glacambre/more_editors
native_background.ts: Add more editors
2018-11-10 11:45:20 +00:00
glacambre
2f1fdd4981
native_background.ts: Add more editors 2018-11-10 12:07:45 +01:00
Oliver Blanthorn
a679c3cf9c
Merge pull request #1157 from glacambre/fix_doc
Fix doc
2018-11-08 07:28:35 +00:00
glacambre
56fe0d9d7e
excmds.ts: Update guiset documentation links
Fixes https://github.com/tridactyl/tridactyl/issues/1104
2018-11-08 07:03:58 +01:00
glacambre
cd55b6f0f8
Update documentation links
As cmcaine said in #1149, the help page links are currently broken
because typedoc tries to generate documentation for source files in the
`compiler/` directory. I just realized that before #1026, these files
were not referenced in any of the files in the `src` directory and this
is why typedoc ignored them. This change happened because I wanted to
type the metadata.

There are three possible solution to #1149.
- Go back to untyped metadata.
- Move the metadata types to Tridactyl's src directory on build.
- Update all links to the doc.

I believe having typed metadata is useful and I'd like to keep it that
way. Moving the metadata types to Tridactyl's src directory is certainly
doable but doesn't sound like the best idea to me, we're unnecessarily
copying files. Updating the links to the doc sounds reasonable as it's
only a one-time thing and so this is what this commit does in order to
close #1149.
2018-11-08 07:00:35 +01:00
Oliver Blanthorn
2548fb07e7
Update number of beta users 2018-11-07 18:42:18 +00:00
Oliver Blanthorn
656269958d
Merge branch 'fix-1084' 2018-11-07 11:16:53 +00:00
Oliver Blanthorn
2a0f9ed1a0
Add the right version of web-ext-types 2018-11-07 11:14:17 +00:00
Oliver Blanthorn
ed581e1fa8
Merge pull request #1153 from glacambre/minor_code_cleanups
Minor code cleanups
2018-11-07 08:40:55 +00:00
Oliver Blanthorn
a48aa562c7
Merge pull request #1154 from glacambre/hide_hidden_symbols
Hide @hidden symbols
2018-11-07 08:39:50 +00:00
glacambre
ba2537cf04
Completions: do not show @hidden excmds 2018-11-07 08:39:36 +01:00
glacambre
ecc936ea7e
compiler: Add information about @hidden symbols to metadata 2018-11-07 08:12:53 +01:00
glacambre
7b5f7ef298
Minor code cleanups
This commit makes error messages when the native messenger is
unavailable easier to read. Since they're easier to read, there's no
need for custom errors in setclip/getclip anymore, provided that the
errors they throw are correctly logged. In order to make sure of that,
we remove the try/catch in excmds.ts:clipboard(), which should let
errors bubble up as needed.

I also noticed that while {set,get}Clipboard relied on the command line
being focused in order to work, they didn't do that themselves and
instead expected their callers to have set things up. This didn't make
sense to me so I moved the focusing code inside of {set,get}Clipboard.

This was all done while chasing the elusive #1135 but probably doesn't
change anything about it.
2018-11-07 06:21:36 +01:00
Anton Vilhelm Ásgeirsson
a09a771955 Only cycle through visible tabs. Fixes #1084. 2018-11-06 14:05:07 +00:00
Oliver Blanthorn
9cf2c2f205
Hide fullscreen internal constant 2018-11-06 12:42:45 +00:00
Oliver Blanthorn
e3465efb36
Update package-lock, prod build bot 2018-11-06 12:40:21 +00:00
Oliver Blanthorn
e09ddab8a2
Fix #1137: merge branch 'donations' 2018-11-06 12:13:42 +00:00
Oliver Blanthorn
3bdd795e81
Merge pull request #1147 from glacambre/fix_commandline_space
Fix commandline failing to insert spaces in middle of words
2018-11-06 09:08:44 +00:00
Oliver Blanthorn
d93aa8bbf8
Merge pull request #1148 from glacambre/fix_990
excmds.ts: Don't rely on activeTab().index for tabprev/tabnext
2018-11-06 09:07:20 +00:00
glacambre
3d878a5ac3
excmds.ts: Don't rely on activeTab().index for tabprev/tabnext
Because of a firefox bug (
https://bugzilla.mozilla.org/show_bug.cgi?id=1504775 ), indexes are not
necessarily contiguous. This becomes an issue in tabnext and tabprev as
these two functions expect contiguous indexes.
We circumvent this issue by grabbing an array of all tabs for the
current window, sorting them by index and the using their index within
that array in order to decide what tabs should be selected.

This fixes https://github.com/tridactyl/tridactyl/issues/990 .
2018-11-06 07:55:14 +01:00
glacambre
b30c68fa51
Fix commandline failing to insert spaces in middle of words
Before this commit, it was impossible to insert a space in the middle of
a word in the command line ; the space would always be inserted at its
end.
2018-11-06 02:19:34 +01:00
Oliver Blanthorn
7f034a161c
Merge branch 'type_compiler' 2018-11-05 13:24:35 +00:00
Oliver Blanthorn
d385e65a76
Update dependencies
Add focus signature with no argument and Document.fullscreenElement to Document interface.

Add sloppy typing to fuseOptions.
2018-11-05 13:12:08 +00:00