Commit graph

1676 commits

Author SHA1 Message Date
Anton Vilhelm Ásgeirsson
79701139fb Remove reopenincontainer excmd. 2018-07-08 17:09:32 +00:00
Anton Vilhelm Ásgeirsson
bc085af46a Refactor Container.getId to be case-insensitive.
Fix bogus browser.tabs.get on an invalid tabId in Request.autoContain.
2018-07-08 09:54:14 +00:00
Anton Vilhelm Ásgeirsson
ca5df7813a Create auconpreservetab config setting.
Improve excmd documentation of autocontain.
Alias 'autocontain' to 'aucon' in config.ts.
Make autoContain preserve tabs if originUrl is defined.
2018-07-07 18:38:06 +00:00
glacambre
c0c83fb320
completions.ts: Remove unused and buggy code
This commit removes an if statement that is always true and a caching
optimization that can go wrong.

The caching optimization is the `if (!this.fuse)` statement. This
optimization can be buggy because it relies on this.options not
changing between two calls to scoredOptions but as far as I can tell,
this.options always changes between two scoredOptions calls.

If this.options changes, the array indexes used in searchThis do not
point to the right elements anymore and everything can break
(completions that should be matched disappear, completions with a lower
score get higher priority etc).

As far as I can tell, removing this optimization does not make
completions slower, but I couldn't test this with a large history.
2018-07-07 20:10:42 +02:00
Anton Vilhelm Ásgeirsson
1f45ded116 Make autoContain dismiss non-http(s) requests.
Limit autoContain matching to domain names only.
Simplify autocontainer logic.
2018-07-07 17:02:20 +00:00
Anton Vilhelm Ásgeirsson
897688a0dd Make Container.fuzzyMatch use Fuse.js.
Return cancel: true from autoContain to cancel extra requests.
2018-07-07 14:50:11 +00:00
Oliver Blanthorn
e00900c128
Merge pull request #770 from glacambre/fix_focus_hijacking
dom.ts: Fix focus hijacking again
2018-07-07 12:41:36 +01:00
Anton Vilhelm Ásgeirsson
4077a7a2a9 Create autocontain excmd. 2018-07-07 11:18:02 +00:00
Anton Vilhelm Ásgeirsson
b42b651524 Create config entry for creating containers on the fly with autocontain directives.
Refactor autocontain code into more logical segments.
2018-07-07 10:57:02 +00:00
glacambre
729035ff2e
dom.ts: Fix focus hijacking again
The previous code called realFocus unconditionally. This fixed
https://github.com/cmcaine/tridactyl/issues/768 but broke
allowautofocus.

The new code makes sure to check the user's allowautofocus setting
before calling realFocus. I am not sure why it fixes #768 but I believe
it might be because bandcamp relies on synchronicity and that the
previous code used await.
2018-07-07 12:17:59 +02:00
Oliver Blanthorn
283166e464
Merge pull request #769 from glacambre/fix_focus_hijacking
dom.ts: Fix focus hijacking
2018-07-07 10:39:39 +01:00
glacambre
e9c636f5c6
dom.ts: Fix focus hijacking 2018-07-06 22:07:25 +02:00
WorldCodeCentral
34ac1240ca
Merge pull request #1 from WorldCodeCentral/WorldCodeCentral-patch-completion-openbackground
Update History.ts
2018-07-06 14:58:33 +02:00
WorldCodeCentral
f1bfc853e6
Update History.ts
Add condition for the -b open in background argument for completions
2018-07-06 14:55:15 +02:00
Oliver Blanthorn
581fda074e
Merge branch 'enhance_tabopen_container_completion' of https://github.com/glacambre/tridactyl into glacambre-enhance_tabopen_container_completion 2018-07-06 12:43:20 +01:00
Anton Vilhelm Ásgeirsson
efb8d63254 Add autocontain examples in config.ts for testing purposes.
Create logic for handling autocontainers before a tab is created.
2018-07-06 10:44:08 +00:00
glacambre
6e8332fe7c
Fix scrolling on bugzilla.mozilla.org
The problem was caused by elements having their scroll-behavior set to
"smooth". This meant that offsetTop was updated with a delay. The delay
made Tridactyl that the element couldn't be scrolled at all and thus
scrolling failed.

This commit has the nice side-effect of disabling smooth scrolling ig
"smoothscroll" isn't set to "true" in the config.

This fixes https://github.com/cmcaine/tridactyl/issues/762.
2018-07-06 07:06:05 +02:00
glacambre
cb06d3b9d5
Fix fillcmdline_tmp not closing the cmdline when changing tabs 2018-07-05 19:50:32 +02:00
glacambre
034d561da8
History.ts: Make winopen completion ignore -private arg 2018-07-05 19:07:00 +02:00
Oliver Blanthorn
35c027b695
Merge pull request #763 from bodograumann/statuspanel
Make guiset hoverlink compatible with firefox 61
2018-07-05 17:02:30 +01:00
Bodo Graumann
f017f74973
Make guiset hoverlink compatible with firefox 61
In firefox 61 there has been a medium change to how the status panel
(that shows the link the user hovers over) is created. Compare firefox
changeset 18bbbdc02213:
https://hg.mozilla.org/releases/mozilla-release/rev/18bbbdc02213

In particular there is no more statuspanel tag. Instead there is an hbox
with id="statuspanel".
2018-07-05 17:51:46 +02:00
Oliver Blanthorn
409f27069e
Merge pull request #759 from glacambre/fix_sanitize_race_condition
Fix race condition in :sanitise
2018-07-05 09:26:19 +01:00
glacambre
2fed33c115
Fix race condition in :sanitise
This fixes https://github.com/cmcaine/tridactyl/issues/724.
What happened was that sanitise was executed,
browser.storage.{local,sync}.clear() was called, the rest of the
settings were modified and only after this was the onChange event
listener in config.ts called, which then cleared the config.

Awaiting the result of .clear() makes sure that the onChange event
listener is triggered before executing any other command that might
make modifications to the browser storage. This can (and has) been
verified by surrounding the .clear() calls with console.logs and adding
a console.log to the onChange event listener.
2018-07-05 08:05:30 +02:00
glacambre
b6792a9ec3
History.ts: Make tabopen completion ignore -c arg 2018-07-05 06:04:05 +02:00
glacambre
b3e5aa6238
Fix shydactyl
As mentionned in https://github.com/cmcaine/tridactyl/issues/748,
https://github.com/cmcaine/tridactyl/pull/736 and
https://github.com/cmcaine/tridactyl/pull/728 broke shydactyl by
changing the number of cells in the completion buffer, which resulted in
the wrong cells being displayed and hidden.

This is fixed by using classes.
2018-07-04 08:14:38 +02:00
glacambre
2eea72e429
Make external clipboard settings simpler, document them 2018-07-04 06:09:09 +02:00
glacambre
587c598b18
Improve code quality in getclip()/setclip()/clipboard() 2018-07-04 06:08:20 +02:00
glacambre
a88d56e396
excmds.ts: Fix small bugs in setclip/getclip 2018-07-04 05:45:35 +02:00
glacambre
39cecd91dd
native_background.ts: Use here-documents to send data to clipcmd's stdin 2018-07-04 05:45:33 +02:00
glacambre
afd4c613c8
Implement native messenger interaction with the X selection buffer 2018-07-04 05:45:29 +02:00
Jeff King
de62321495
Fix yank canonical, short link feedback message 2018-07-03 23:40:06 +01:00
Oliver Blanthorn
c0c0abbcab
Add binds for yankmd and yanktitle 2018-07-03 19:12:04 +01:00
Oliver Blanthorn
cf39a9a05d
Add quiet version of fixamo 2018-07-03 19:05:20 +01:00
Oliver Blanthorn
b4fbdaf2ad
Merge pull request #755 from antonva/fix-containercreate
Fix containercreate.
2018-07-03 15:58:54 +01:00
Anton Vilhelm Ásgeirsson
41f3cbc563 Fix containercreate by deleting the cookieStoreId property after calling fromString. 2018-07-03 14:43:11 +00:00
Oliver Blanthorn
e20a224fb8
Add message to rest of clipboard yank* 2018-07-03 14:56:18 +01:00
Oliver Blanthorn
2a3814abb6
Fix #752: yy and others broken 2018-07-03 14:41:55 +01:00
Oliver Blanthorn
e2986ecc4d
Fix yanktitle 2018-07-03 12:49:16 +01:00
Anton Vilhelm Ásgeirsson
1195521441 Add reopenincontainer excmd.
Add autocmd usage example to src/config.ts.
2018-07-03 11:32:16 +00:00
Matt Friedman
06a8e1db53 add autocmd! to remove specific autocmds 2018-07-02 22:53:04 -07:00
Oliver Blanthorn
b026462dd4
Fix #726: fixamo and guiset now inform the user that they must restart the browser. 2018-07-02 19:36:34 +01:00
Oliver Blanthorn
3f445de847
Add script for finding number of weekly users on buildbot 2018-07-02 13:24:53 +01:00
glacambre
496d1cb0f8
Make <Esc> dismiss fillcmdline_tmp messages 2018-07-02 07:06:26 +02:00
glacambre
d72986eea1
excmds.ts: Fix url2args failing when url doesn't contain an '&' 2018-07-02 06:07:37 +02:00
Oliver Blanthorn
1cb2584a57
Make yank use fillcmdline with timeout.
`clipboard yank` does not use this as it would break commands such as `installnative`.
2018-07-01 20:43:44 +01:00
Oliver Blanthorn
1d38c8a3e1
Merge branch 'master' of github.com:cmcaine/tridactyl into jcrowgey-add_feedback_to_yank 2018-07-01 20:25:49 +01:00
Oliver Blanthorn
d716b48c85
Merge branch 'master' of github.com:cmcaine/tridactyl into glacambre-notification_mechanism 2018-07-01 20:24:09 +01:00
Oliver Blanthorn
92d170c22f
Merge branch 'master' of github.com:cmcaine/tridactyl into glacambre-remove_l 2018-07-01 20:15:57 +01:00
Oliver Blanthorn
b46d85d259
Merge branch 'master' of github.com:cmcaine/tridactyl into glacambre-fix_#613 2018-07-01 20:10:38 +01:00
Oliver Blanthorn
8c8ce82615
Merge branch 'master' of github.com:cmcaine/tridactyl into glacambre-private_bufferall 2018-07-01 19:33:01 +01:00