diff options
| author | mrmr1993 | 2014-12-30 15:20:49 +0000 |
|---|---|---|
| committer | mrmr1993 | 2014-12-30 15:20:49 +0000 |
| commit | f946d23125a80233799564b57253ace2c44b8994 (patch) | |
| tree | 7d69fb74e088fa6d6ce5310eae010254fb4404f1 /content_scripts | |
| parent | a4a591156f451c1d360530fce6674189f384b452 (diff) | |
| download | vimium-f946d23125a80233799564b57253ace2c44b8994.tar.bz2 | |
Reinstate UIComponent.show
Diffstat (limited to 'content_scripts')
| -rw-r--r-- | content_scripts/ui_component.coffee | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/content_scripts/ui_component.coffee b/content_scripts/ui_component.coffee index 696cb42c..8b229725 100644 --- a/content_scripts/ui_component.coffee +++ b/content_scripts/ui_component.coffee @@ -38,15 +38,18 @@ class UIComponent @iframeElement.style.border = '5px solid yellow' setTimeout((=> @iframeElement.style.border = borderWas), 200) else - @iframeElement.setAttribute "style", @showStyle - @showing = true + @show() @iframeElement.focus() + show: (message) -> + @postMessage message if message? + @iframeElement.setAttribute "style", @showStyle + @showing = true + hide: (focusWindow = true)-> - if @showing - @iframeElement.setAttribute "style", @hideStyle - window.focus() if focusWindow - @showing = false + @iframeElement.setAttribute "style", @hideStyle + window.focus() if focusWindow + @showing = false root = exports ? window root.UIComponent = UIComponent |
