| Age | Commit message (Collapse) | Author |
|
|
|
This also stops the content scripts from being injected into each frame
on reload (in Firefox only). They do not successfully connect to the
background page, and it causes considerable lag, so we lose nothing by
doing this.
|
|
|
|
`SearchEngines` was previously in `utils.coffee`, which means it was
loaded in *every* content frame. This is unnecessary, since it is only
used on the background page. So this PR moves it there.
Also:
- Simplify some unnecessarily complex logic in `vomnibar.coffee`.
- Re-use `Utils.parseLines()` to parse the custom search engine configuation text.
|
|
Here, these map to escape:
translate x <c-[>
translate <c-c> <c-[>
|
|
|
|
|
|
|
|
Some of this code is showing its age, so these are just a number of
minor tweaks (to keep things clear, consistent and concise).
Also, add a couple of tests (while we're at it).
|
|
Conflicts:
content_scripts/vimium_frontend.coffee
|
|
There's no need to have the previous unusual calling style (passing the
arguments as a list. It looks more natural to pass tham just as regular
arguments, as here.
|
|
While working on the visual-mode code, it became apparent that our
current "singleton" implementation is unnecessarily complicated.
This simplifies it. The keys are now required to be strings.
(Previously, they could be any object; which meant we needed to gove
objects an identity. All of which was complicated.)
|
|
The intention is to use this to clean up some of the initialisation
sequences in the front end.
|
|
|
|
|
|
|
|
|
|
Rework to make match counting code for searches more DRY and easier to read
|
|
|
|
|
|
The fix for Chromium issue 483000 landed in this version, so it is no
longer necessary for #1611
|
|
remove Utils.createElementFromHtml since it's not in use
|
|
This implements @gdh1995's idea from #1796.
|
|
Revert it.
|
|
This fixes two bugs in SimpleCache.
1. Rotate the cache on the next tick. There is a marginally small
chance that the cache will rotate between calls to .has() and .get().
So, we do the rotation ansynchronously. This guarantees that these
two functions will always see the same cache state.
2. The implementation of .clear() (which is unused, I think) has at some
point become out of date (and incorrect) w.r.t. the implementation of
.rotate().
|
|
Direct keyboard access to custom-search engines via keyword flag
|
|
For ...
map s Vomnibar.activate keyword=g
... we verify that "g" is indeed a custom search-engine keyword before
setting it. If it is not, we output a console.log message and launch a
vanilla vomnibar. (An alternative would be to bail.)
|
|
This will allow us to use the same search-engine parsing code in the
background page and in content scripts.
|
|
|
|
Conflicts:
background_scripts/completion.coffee
|
|
|
|
A custom search engine like this...
i: https://www.google.ie/search?q=%s&num=30&newwindow=1&biw=1918&bih=1015&tbm=isch Google image search
Should not match a URL like this...
https://www.google.ie/search?q=bbc+sport
|
|
|
|
|
|
If we go with this and #1662, then we can share the utility.
|
|
Change the implementation of SimpleCache such that it does not rely upon
timers. The problem with times is that they retain a reference to the
object even if Vimium itself loses all references. This approach seems
simpler, and perfectly adequate for our purposes.
|
|
|
|
|
|
|
|
|
|
|
|
This revamps how search-engine configuration is handled, and revises
some rather strange legacy code.
|
|
|
|
|
|
|
|
|
|
|
|
SimpleCache should reset the timer very time it's rotated (including
when the allowed number of entries is exceeded.
|
|
This is @mrmr9393's suggestion from #1636. It mimic's Chrome's behaviour
when a javascript: URI is enetered into the omnibox (or clicked).
Fixes #1611.
|
|
|