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.
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.
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.
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 .
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.
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.
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.
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
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.
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.
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 .