aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/vomnibar.coffee
AgeCommit message (Collapse)Author
2016-04-28Fix UI-component initialization issues.Stephen Blott
This fixes some UI component initialization issues. It's a long story... The problem. - Go to this page: http://www.thejournal.ie/seanad-election-results-2016-2737768-Apr2016/ - Click one of the links from the "Most Popular" box on the right. - Navigate back (`H`) and, as the original page is loading, activate the Vomnibar. In 1.54 this renders Vimium unusable. In `master` this renders the Vomnibar unsable, but the rest of Vimium usable. It seems the source of the issue is that we're initializing UI components too soon. We need to wait until the `readyState` is "complete". With this PR: - The Vomnibar is initialised when the `readyState` is "complete" (in the top frame only, and only if Vimium is enabled). Requests arriving prior to then are silently discarded. - The HUD is also initialized only when the `readyState` is "complete"; however, requests arriving before then are queued. So, if the user immediately enters insert mode, then the "Insert mode" indicator will eventually be displayed. - The help dialog silently discards requests until the `readyState` is "complete. I'm posting this as a PR because: 1. It needs some visibility. 2. With this, if the `readyState` *never* reaches "complete", then the Vomnibar would be unusable. And that's pretty serious.
2016-04-18Revert "UI-compnent commands must wait for the document to be ready."Stephen Blott
This reverts commit c01d7eea8675f9a7d84999777e8de72244d687b6. Preparatory to implementing an alternative approach.
2016-04-17UI-compnent commands must wait for the document to be ready.Stephen Blott
2016-04-17Only Vomnibar.init() when the Vomnibar is needed.Stephen Blott
The Vomnibar isn't needed on most tabs, so don't init it. I cannot detect any sluggishness as a result of this.
2016-04-17Make showHelp a top-frame command.Stephen Blott
Replaces #2037.
2016-04-16Minor code review.Stephen Blott
2016-04-16Rework UI component focus handling.Stephen Blott
The code to handle the focus for UI components has been tweaked and adapted over time, and has become quite complicated (and brittle). This reworks it from scratch, and co-locates similar code which does related things. Fixes #2099.
2016-04-10Fix Vomnibar initialization issue.Stephen Blott
On a slow loading page, as the page is loading, hit `o` repeatedly. Eventually, Vimium hangs. We seem to have had this problem for quite some time (e.g. it's in 1.54). This fixes the problem by ensuring that the Vomnibar is initialized before launching it. Also fix the same issue for the help dialog.
2016-04-02Simplify UI component initialisation.Stephen Blott
There's no need for the previous complicated approach to UI component initialialisation, in particular for the Vomnibar. We only initialise the Vomnibar in the top frame. However, if for some reason it hasn't been initialised by the time it's needed, then we can just initialise it then. We are only initialising it early to avoid flicker, so it's not a correctness issue. And the only reason it wouldn't be initialised is if Vimium is disabled in the top frame, but enabled in some other frame -- which is not a common case.
2016-03-05Key bindings; rewire vomnibar.Stephen Blott
2016-02-20Refactor command-option parsing.Stephen Blott
When we introduced command options (for mapping keys to custom-search engines), the parsing was done in the Vomnibar code. This moves the parsing to `commands.coffee`, which is where it should always have been. This is a preliminary step with a view to adding a new `count` command option.
2015-05-31Replace settings.get with Settings.get in the frontendmrmr1993
2015-05-30Use the term "options" instead of "flags" for command options.Stephen Blott
"Flags" implies binary toggles. The term "options" seems more consistent with what's actually going on here.
2015-05-29Verify keyword for custom search-engine activation.Stephen Blott
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.)
2015-05-29Prepopulate @customSearchMode in vomnibar.Stephen Blott
This avoids a flicker whereby the keyword is first inserted into the input, then removed.
2015-05-29Implement pre-population of custom-search keywords.Stephen Blott
Now, a mapping of the form: map s vomnibar.activate keyword=g makes the vomnibar open (on "s") with the Google custom-search engine activated immediately (assuming it's configured). The corresponding custom search-engine configuration would be: g: http://www.google.com/search?q=%s Google
2015-04-23Activate vomnibar in window.top; no flicker and tidy up.Stephen Blott
1. Rework event handling to eliminate frame flicker (a la #1485). 2. Tidy up logic. Which should make this more robust.
2015-03-17Activate vomnibar in window.top; more clean up.Stephen Blott
2015-03-17Activate vomnibar in window.top; minor clean up.Stephen Blott
2015-03-17Activate vomnibar in window.top; refocus original frame.Stephen Blott
2015-03-06Remove need for short delay to prevent vomnibar flicker.Stephen Blott
This delivers a "hidden" massage to the vomnibar after the vomnibar has been hiddent in the host page. The vomnibar only performs whatever action is required when it receives this "hidden" message.
2014-12-30Vomnibar; reinstate test on event.data.Stephen Blott
Accidentally dropped in 1bc415536fe45ad40ac37282ea54644361ec73f7.
2014-12-30Minor changes to vomnibar-in-iframe.Stephen Blott
From top to bottom on the diff: - The echo handler on the background page is no longer required. - Simplify/refactor vomnibarUI message handler. - Initialise vomnibar query to "" (rather than null) and simplify. - No need to focus parent window when vomnibar closes; that's handled by the iframe framework. Also no need to blur.
2014-12-29Use UIComponent for Vomnibar iframemrmr1993
2014-10-31Merge vomnibarToPage from @mrmr1993.Stephen Blott
2014-10-31Add comments about moving the Vomnibar to an iframemrmr1993
2014-10-25Merge branch 'feature/edit-url-in-vomnibar' of github.com:sukima/vimium into ↵Stephen Blott
sukima-feature/edit-url-in-vomnibar Conflicts: background_scripts/commands.coffee
2014-09-17Move the vomnibar to an iframemrmr1993
2014-09-03Changed to show url when item selectedLuan Nico
2014-08-22Switching again to Ctrl+EnterLuan Nico
2014-08-22Changed key biding to use right arrow instead of tab, returning previous tab ↵Luan Nico
functionalities
2014-08-21Suggestion for impl of #1141Luan Nico
2014-08-12Fix for 1005Timo Sand
fixes #1005
2014-06-20added selection of search engines without pressing tabmike-work
2014-03-01Add Vomnibar.activateEditUrl commandsDevin Weaver
Often times when I'm working on sites I want to add a query string or modify the port number. The go up one level or root of the URL commands are nice but they don't alow you to add or remove specifics on the current URL. This adds two commands that act exactly like the normal onmibar open but populates the bar with the current URL. I picked `ge` as the default and `gE` as the default for the same in a new tab.
2013-09-12Changed deprecated chrome.extension on chrome.runtime in all files and fix testsMaksim Ryzhikov
2013-05-06Replace all deprecated sendRequest() calls with new sendMessage()sainaen
2012-11-22Enter on empty vomnibar a no-op.Stephen Blott
2012-11-12Allow ctrl+enter to open a suggestion in a new tabPhil Crosby
It's pretty natural to hit CTRL+N and CTLR+P to select a choice, and then CTRL+enter to open it in a new tab. But previously that didn't work on mac.
2012-11-10Inject bookmarklets by appending them as scripts.Jez Ng
This *should* fix the permission problems that `eval` faced. Closes #575, #710.
2012-10-29More tests, because I like having coverage.Jez Ng
2012-10-28Ensure the initial selection index is always respected.Jez Ng
Closes #687.
2012-10-20Refactor handlerStack. Closes #657.Jez Ng
Previously, handlerStack was designed only for removal of the handler right at the top of the stack. However, some handlers sought to remove themselves when they were not at the top of the stack, creating confusion. The new handlerStack ensures that such removal can always be done safely.
2012-10-20Ensure Vomnibar selection is always within bounds.Jez Ng
Closes #670.
2012-09-12Use block stringsDarren Jeacocke
2012-09-10Add missing vimiumReset.Jez Ng
2012-09-04Style fixes.Jez Ng
Errors were detected using coffeelint.
2012-08-06vomnibar: New tabs for 'O' and 'B'Carl Helmertz
'B' is a new command for searching for a bookmark and opens it in a new tab. 'O' now searches through history and bookmarks and opens the selected item in a new tab. Previously, it started vomnibar with the current URI selected and opened the selection in the same tab. This fixes #594. Signed-off-by: Carl Helmertz <helmertz@gmail.com>
2012-07-22Use vimium-specific class names, and use vimium reset. Now the vomnibar is ↵Phil Crosby
more resistant to a site's css. Previously the vomnibar didn't look great on Quora because of this.
2012-07-15Close omnibar when enter is pressed (#585)Aaron Hall