aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/vimium_frontend.coffee
AgeCommit message (Collapse)Author
2018-10-28fix a small typo that attachShadow needs an argumentgdh1995
2018-10-28use Shadow DOM v1 if it existsgdh1995
Chrome 70 has deprecated Shadow DOM v0 and displayed a warning when it's used. And accroding to https://www.chromestatus.com/features/4507242028072960, Shadow DOM v0 will be removed since Chrome 73. The support for Shadow DOM v1 has been there since Chrome 53 and is enabled by default on Firefox 63, so it's time to use it. Old support is still needed because Vimium's min_chrome_version is 51.
2018-09-04Use function directly.Stephen Blott
If Vimium becomes disabled, then we remove this listener. So we better add the actual function we want to (later) remove, rather than creating a new function (which will never be removed.
2018-09-04Tweak #3119.Stephen Blott
1. Use verb phrase for function name. 2. Add `Scroller.reset()` method. This *only* resets the activated element. 3. Reset the scroller only if the URL has changed. (Previously, in #3119, the scroller was also being reset when the tab gained the focus.) Based on a suggestion from @marcotc.
2018-09-04Refactor, part 1Marco Costa
2018-02-05Create flash frame Shadow DOM element on demand.Stephen Blott
It looks like we'll be initialising the Vomnibar on demand (see #2939, merged). In this case, we should also initialise the flash frame on demand. This means that *none* of Vimium's UI elements are now created until they are needed.
2018-02-04Disable pre-loading of Vomnibar iframe.Stephen Blott
Pre-loading the Vomnibar iframe seems to be causing some issues with the dev console. This PR disables pre-loading of the Vomnibar. I'm going to try this out for a while. If it doesn't seem to sluggish, then I'll merge it.
2018-01-19Fix bug on hashchange event.Stephen Blott
This handler is undefined at the point that it is installed. The definition is at the bottom of the file.
2017-12-14Fix enabled state on webNavigation.Stephen Blott
`forTrusted()` for `checkEnabledAfterURLChange()` after web navigation is being called with a request (not an event). So make the request trusted. The symptom was that pass keys and the enabled state was not being correctly updated on web navigation.
2017-11-22Add a comment for Frame expando fixmrmr1993
2017-11-22FF: Reattach expando on every message to Framemrmr1993
This fixes #2830: it stops timesofindia.indiatimes.com from failing due to FF bug 1408996.
2017-11-18Note reason for this rather obscure line.Stephen Blott
2017-11-14FF: Restore window expando on every event listenermrmr1993
This should fix *most* problems from Firefox issue 1408996[1]. The root cause of the bug is that document.domain is set, and Firefox discards the 'expando' for the window that contains all properties we set. Technically, this can happen at any time, and so some failures are still possible. This fixes #2799. [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1408996
2017-11-02Remove the right listener from hashchangemrmr1993
2017-10-29Tidy up exports in vimium_frontendmrmr1993
2017-10-29Move findAndFollow* to mode_normal.coffeemrmr1993
2017-10-29Move FocusSelector to mode_normal.coffeemrmr1993
2017-10-29Move selectFoundInputElement into mode_findmrmr1993
2017-10-29Move focusFoundLink into mode_find, don't expose it as globalmrmr1993
2017-10-28Remove invokeCommandString, call NormalModeCommands directlymrmr1993
2017-10-27Move goPrevious and goNext to normal mode filemrmr1993
2017-10-27Split focusInput, move the main part into the normal mode filemrmr1993
2017-10-27Move passNextKey to normal mode filemrmr1993
2017-10-27Move mainFrame and showHelp to normal mode filemrmr1993
2017-10-27Move normal mode find commands into normal mode filemrmr1993
2017-10-27Move findAndFocus into FindMode, rename to findNextmrmr1993
2017-10-27Move FindMode exit functions into FindModemrmr1993
2017-10-27Move self-contained normal mode commands to normal mode filemrmr1993
2017-10-27Move NormalMode to its own content scriptmrmr1993
2017-10-27Fix #2738.Stephen Blott
I omitted to check this properly. It turns out we weren't getting the options from the correct place.
2017-10-25FF: Only apply fix to bug 1408996 when appropriatemrmr1993
2017-10-25FF: Workaround bug 1408996 in focusInput's focus listenermrmr1993
2017-10-25FF: Share |root| global proxy, re-add the globals to window on DOMLoadmrmr1993
This is a workaround for Firefox bug 1408996.
2017-10-24Add |hard| option to reload commandmrmr1993
2017-10-02FF: Lazy load the Vomnibar for XML documentsmrmr1993
Injecting HTML into XML documents on Firefox breaks the rendering (collapsing it into plain text). By not loading it until explicitly requested, we can avoid this breakage (at least, until a user triggers some of our UI manually).
2017-09-12Use browser.runtime.getBrowserInfo to identify Firefoxmrmr1993
2017-08-18Check whether events are trusted before executing listenersmrmr1993
2017-04-20Blur the focused iframe when restoring window focusmrmr1993
This works around FF issue 554039, which prevents window.top.focus() from working.
2017-04-18Remove use of keyCodes entirely.Stephen Blott
event.keyCode` is depricated: - https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode
2017-04-18Rework tests for all key handling on keydown.Stephen Blott
2017-03-10Use the appropriate handler for hashChangemrmr1993
2017-02-11Don't depend on global event for Frame event listeners (FF)mrmr1993
2016-12-21Merge pull request #2311 from smblott-github/enterNormalModeStephen Blott
New command option to enter normal mode
2016-12-12Remove unused parameter.Stephen Blott
2016-12-11Rework help-dialog HTML.Stephen Blott
Previously, the dynamic HTML for the help dialog was generated on the background page. The HTML itself was tangled in with program logic. Here, we move all of the HTML to HTML5 templates; also, we build the help-dialog contents in the help dialog itself, not on the background page. Note: #2368 is included here too. (Background: I'm trying to clean up some of the command and help-dialog logic in preparation for addressing the issue of how to document command options, see #2319.)
2016-12-10Use 'map X passNextKey normal'.Stephen Blott
2016-10-15enterNormalMode; tweak indicator.Stephen Blott
2016-10-15enterNormalMode; new command - implementationStephen Blott
Here's the problem... Many sites define their own keyboard shortcuts, for example Google Play Music defines `gh` for "go home". On such sites, it's natural to set up pass keys for `g` and `h`. But that makes any Vimium key bindings which begin with `g` inaccessible. Here, we add a new command `enterNormalMode` which installs a new normal-mode instance (without any pass keys). This executes a single normal-mode command then exits. Example: map \ enterNormalMode map | enterNormalMode count=999999 Assuming `g` and `o` are pass keys: - `gh` or `o` - use the page's binding - `\gg` - scroll to top - `2\ggo` - scroll to the top and open the Vomnibar - `\g<Escape>o` - open the Vomnibar - `\<Escape>o` - use the page's bindings - `\\\\\\<Escape>o` - use the page's bindings (new normal-mode instances displace previous ones) This required some changes to the scroller. Previously, we only ever had one normal-mode instance, and could arrange statically that the scroller's key listeners were above normal-mode's key listeners in the handler stack. Here, we fix this by adding and removing the scroller's listeners dynamically, so they're always at the top of the handler stack.
2016-10-15No-op; rearrange content-script command arguments.Stephen Blott
This is a no-op. It arranges that the registry entry for each command is passed to the command, for every command. That required a small ammount of reworking in a couple of cases.
2016-10-10Disable grab-back-focus in all frames.Stephen Blott
When the user begins interacting with one frame, we disable the grab-back-focus mode in *all* frames. Previously, grab-back-focus was preventing users from selecting inputs in frames other than the active frame. Fixes #2296 (possibly).