aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts
diff options
context:
space:
mode:
Diffstat (limited to 'content_scripts')
-rw-r--r--content_scripts/vimium_frontend.coffee15
1 files changed, 15 insertions, 0 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index 1f116f88..245e481a 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -181,6 +181,8 @@ window.addEventListener "focus", ->
initializeOnDomReady = ->
enterInsertModeIfElementIsFocused() if isEnabledForUrl
+ testUIComponentSetup()
+
# Tell the background page we're in the dom ready state.
chrome.runtime.connect({ name: "domReady" })
@@ -920,6 +922,10 @@ exitFindMode = ->
window.showHelpDialog = (html, fid) ->
return if (isShowingHelpDialog || !document.body || fid != frameId)
+
+ testUIComponent.show()
+ testUIComponent.postMessage "version: #{chrome.runtime.getManifest().version}; random number: #{Math.random()}"
+
isShowingHelpDialog = true
container = document.createElement("div")
container.id = "vimiumHelpDialogContainer"
@@ -966,6 +972,9 @@ window.showHelpDialog = (html, fid) ->
hideHelpDialog = (clickEvent) ->
+
+ testUIComponent.hide()
+
isShowingHelpDialog = false
helpDialog = document.getElementById("vimiumHelpDialogContainer")
if (helpDialog)
@@ -1086,6 +1095,12 @@ Tween =
value = (elapsed / state.duration) * (state.to - state.from) + state.from
state.onUpdate(value)
+testUIComponent = null
+testUIComponentSetup = ->
+ testUIComponent = new UIComponent "pages/test_ui_component.html", "testUIComponent"
+ testUIComponent.setHideStyle "display: none;"
+ testUIComponent.setShowStyle "display: block;"
+
initializePreDomReady()
window.addEventListener("DOMContentLoaded", registerFrame)
window.addEventListener("unload", unregisterFrame)