Commit graph

2086 commits

Author SHA1 Message Date
Oliver Blanthorn
6da1e02442
Merge pull request #1919 from arcnmx/empty-config-fix
Treat missing config as an empty object
2019-10-21 11:05:48 +01:00
notJerl
f754234ea3
Update config.ts 2019-10-20 23:28:17 -06:00
notJerl
558b87dad9
Fix default config bug
Prevents a bug where these bindings cannot be changed by the end user.
2019-10-20 23:10:44 -06:00
arcnmx
7c86998342 Treat missing config as an empty object 2019-10-20 14:39:30 -07:00
Jakub Okoński
dd422cd136 Enable some low-hanging TypeScript strictness options 2019-10-20 13:09:21 +02:00
Jakub Okoński
ecd3a218aa Clean up toLowerCase unused declaration 2019-10-18 14:57:20 +02:00
Jakub Okoński
9b4d52dbd2 Try another fix 2019-10-18 14:39:47 +02:00
Jakub Okoński
0ebc44741b Try a fix for selenium export under the wrong name 2019-10-18 14:11:19 +02:00
Jakub Okoński
67fa18b4ec Add a separate tsconfig for tests
Tests run with nodejs + jest types, while the web extension code
runs with browser + web-ext type roots.
2019-10-18 13:07:38 +02:00
Jakub Okoński
bd2b988338
Fix and optimize addJump scroll handler
It was reading properties that a scroll event does not have.

It was messaging the background page with an expensive call on every
scroll event. This slowed down the page unnecessarily.

Also extracted jumps.timeoutid to the content script scope.
This variable is not useful to others outside of the current content
script. Storing it locally means we can avoid expensive communication
with the background page and only do it once we're sure we need to add
a new entry to the jump list.
2019-10-18 11:49:13 +01:00
arcnmx
7e1888a683
Don't merge local and remote configs
The entire config gets written to one storage or the other and there's
no support for partially setting values locally or remotely; so it's
meaningless to try and merge them on initialization.
2019-10-18 11:16:10 +01:00
arcnmx
e78ed69fa3
Fix storageloc setting
The storageloc setting is inherently unsyncable; since it is used to
decide which storage to use, it is always set to "local" in local
storage and "sync" in sync storage. Any updates from sync storage will
cause mayhem and override local settings with "sync".

So instead, ensure that it is always saved to local storage with the
intended value, and that remote updates cannot change it.
2019-10-18 11:16:10 +01:00
Oliver Blanthorn
71ae77a432
Merge branch 'autocontain-urlpattern' 2019-10-18 10:55:54 +01:00
Oliver Blanthorn
7a7b017c3c
Merge pull request #1764 from arcnmx/source-race-conditions
:source race conditions
2019-10-18 10:52:04 +01:00
arcnmx
f4ff5c8fc3 autocontain excmd compatibility
Retain old behaviour unless the `autocontain -u` flag is used.
2019-10-17 15:00:34 -07:00
arcnmx
f169163755 Explicitly delete unset keys
Default object keys depend on unset values explicitly not existing as
keys.
2019-10-17 14:27:26 -07:00
Oliver Blanthorn
15b498971e
Merge branch 'autocontain-relaxed' 2019-10-17 22:05:24 +01:00
Oliver Blanthorn
308ac0a043
Tidy autocontain docs 2019-10-17 22:05:13 +01:00
Oliver Blanthorn
6d39bdd343
Fix #1910: improve autocmd docs 2019-10-17 20:56:48 +01:00
arcnmx
fec571d748 autocontainmode: "strict" | "relaxed"
The prior (and still default) autocontain behaviour is to intercept all
page loads that match an aucon pattern, and may even replace a tab to do
so. "relaxed" mode is introduced here as a way to only apply the rules
when opening a new tab.
2019-10-16 11:38:36 -07:00
arcnmx
335f15b4ab configversion 1.8 to migrate autocontain patterns 2019-10-16 11:33:11 -07:00
arcnmx
6fbcb4e719 treat autocontain settings as url patterns
Be more consistent and in line with the `seturl` family of settings.
2019-10-16 11:32:12 -07:00
arcnmx
4428bf957e Synchronize with storage before setting config
Mitigate the impact of racy settings updates by synchronizing with the
storage before setting any new values.
2019-10-16 09:43:37 -07:00
arcnmx
6528c69314 Conservative config delta logic
Avoid referring to the global state and consult oldValue to determine
what settings have changed instead.
2019-10-16 09:43:37 -07:00
arcnmx
1cbf1d3f3f Partial config updates to avoid race clobbering
Updates to the global configuration object happen via storage onChanged
event, however this is not guaranteed to fire before a set() promise
resolves: https://bugzilla.mozilla.org/show_bug.cgi?id=1554088

This can lead to situations where setting multiple values in sequence
can result in a previously scheduled callback clobbering newer settings.
Slightly mitigate races by not replacing the entire object; however this
only helps with flat values and won't catch nested object updates such
as the keymap settings.
2019-10-16 09:43:37 -07:00
arcnmx
798d03890b config onChanged formatting
Minor cleanup to help make subsequent commit diffs less noisy.
2019-10-16 09:43:37 -07:00
Oliver Blanthorn
58cc39f8c6
Update funding information
GitHub sponsors have invited me to the beta. There isn't one for organisations
yet so you'll have to trust me to distribute the donations fairly.

I pinky promise that I will.
2019-10-11 10:51:33 +01:00
Oliver Blanthorn
691b83069d
Update donation total 2019-10-07 17:29:00 +01:00
Colin Caine
a649b80b81 1.17.0 2019-10-03 01:43:28 +01:00
Colin Caine
abccdd620a Update unfixamo page text 2019-10-03 00:55:34 +01:00
Oliver Blanthorn
d3ae60c8f3
Merge pull request #1879 from tridactyl/remove_csp
Remove `set csp clobber`
2019-10-03 00:59:48 +08:00
glacambre
5ccaecdab5
native.ts: make unfixamo check stricter 2019-10-02 18:48:16 +02:00
glacambre
a4040102f5
Remove set csp clobber
This just removes the background.ts code that detects whether the user
wants to clobber their csp and adds an error message if the user tries
to `set csp clobber`.
The `csp` setting is marked as deprecated but left untouched in case we
find a way to edit CSP in a way that complies with Mozilla's policies.
The csp-editing code in `requests.ts` is left untouched for the same
reason.
2019-10-02 10:25:03 +02:00
glacambre
32eebb4614
Display unfixamo page when reverting fixamo settings 2019-10-02 10:12:41 +02:00
glacambre
604cac6364
native.ts: make unfixamo revert restrictedDomains
Rationale explained in
https://github.com/tridactyl/tridactyl/pull/1877#discussion_r330390961
2019-10-02 09:32:00 +02:00
glacambre
6759bd235d
Implement changes required by Mozilla.
More information in #1800.
2019-10-02 08:31:37 +02:00
Oliver Blanthorn
019fc2c31b
Merge branch 'add_gist_rc_loading' 2019-09-20 19:11:34 +01:00
Oliver Blanthorn
7d05f76b40
Improve source URL help 2019-09-20 19:10:45 +01:00
Oliver Blanthorn
fd0cfd9b36
Merge pull request #1851 from rektrex/add_extoptions
add extoptions excmd
2019-09-20 18:58:21 +01:00
Oliver Blanthorn
62b8bf0992
Merge branch 'replace-flatten' 2019-09-20 18:05:10 +01:00
rektrex
7670cc7784 make source --url use current page's url when no url is given' 2019-09-20 01:27:00 +05:30
rektrex
49fb856523 combine source_from_url to source 2019-09-20 00:24:40 +05:30
rektrex
8f0b2a5ab8 add exmcmds to load RC file from url 2019-09-19 22:14:51 +05:30
rektrex
bf1a07467f trim url for p and P commands 2019-09-18 13:14:50 +05:30
Chris
ba32beb3ce
Correctly detects Windows when applying colors
Partial solution to #1378
Previously, this expression would evaluate to null, producing a false negative on Windows systems, due to a syntax issue
2019-09-17 16:09:11 -04:00
pvs
1fb0aecf30 Get all the elements that match the given selector inside shadow DOM
- Blur shadow dom active element
2019-09-15 09:48:58 -07:00
pvs
04b1ea13a9 Fix insert mode if an input inside a shadow DOM is focused 2019-09-14 14:24:45 -07:00
rektrex
78a39488f7 improve extoption: extoptions(extension_name) opens options in a popup window 2019-09-14 21:36:09 +05:30
rektrex
0faad6c86a update aliases for Pentadactyl compatibility 2019-09-14 12:16:57 +05:30
rektrex
b2c89cd03f add aliases for Pentadactyl compatibility 2019-09-14 03:17:20 +05:30