From a471867fad98a4363c5df5f5ae1becbc289d1dbd Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Tue, 28 Apr 2015 14:27:48 +0100 Subject: Simplify 8975229fd637ca1a91d7c52beb5969fe2b5e4d27. --- content_scripts/vimium_frontend.coffee | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'content_scripts') diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 85fa5f12..da2292de 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -13,7 +13,6 @@ isShowingHelpDialog = false keyPort = null isEnabledForUrl = true isIncognitoMode = chrome.extension.inIncognitoContext -isDomReady = false passKeys = null keyQueue = null # The user's operating system. @@ -254,7 +253,6 @@ window.addEventListener "hashchange", onFocus # Initialization tasks that must wait for the document to be ready. # initializeOnDomReady = -> - isDomReady = true # Tell the background page we're in the dom ready state. chrome.runtime.connect({ name: "domReady" }) CursorHider.init() @@ -1157,7 +1155,10 @@ HUD = else HUD._tweenId = Tween.fade HUD.displayElement(), 0, 150, -> HUD.hide true, updateIndicator - isReady: -> document.body != null and isDomReady + isReady: do -> + ready = false + DomUtils.documentReady -> ready = true + -> ready and document.body != null # A preference which can be toggled in the Options page. */ enabled: -> !settings.get("hideHud") -- cgit v1.2.3