From d15f4a13c273934000173562cfa0f2b4c936c6f7 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sun, 4 Feb 2018 08:50:27 +0000 Subject: Disable pre-loading of Vomnibar iframe. 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. --- content_scripts/vimium_frontend.coffee | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'content_scripts/vimium_frontend.coffee') diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 594175ab..11310dcf 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -113,19 +113,6 @@ installModes = -> new GrabBackFocus if isEnabledForUrl normalMode # Return the normalMode object (for the tests). -initializeOnEnabledStateKnown = (isEnabledForUrl) -> - installModes() unless normalMode - if isEnabledForUrl - unless Utils.isFirefox() and document.documentElement.namespaceURI != "http://www.w3.org/1999/xhtml" - # We only initialize (and activate) the Vomnibar in the top frame. Also, we do not initialize the - # Vomnibar until we know that Vimium is enabled. Thereafter, there's no more initialization to do. - # - # NOTE(mrmr1993): In XML documents on Firefox, injecting HTML into the DOM breaks the rendering, so we - # lazy load the Vomnibar. This comes with the expected issues, but is better than breaking all XML - # documents. - DomUtils.documentComplete Vomnibar.init.bind Vomnibar if DomUtils.isTopFrame() - initializeOnEnabledStateKnown = -> - # # Complete initialization work that should be done prior to DOMReady. # @@ -305,7 +292,7 @@ checkIfEnabledForUrl = do -> Frame.addEventListener "isEnabledForUrl", (response) -> {isEnabledForUrl, passKeys, frameIsFocused, isFirefox} = response Utils.isFirefox = -> isFirefox - initializeOnEnabledStateKnown isEnabledForUrl + installModes() unless normalMode normalMode.setPassKeys passKeys # Hide the HUD if we're not enabled. HUD.hide true, false unless isEnabledForUrl -- cgit v1.2.3