2 # Copyright Simon Lydell 2015, 2016.
4 # This file is part of VimFx.
6 # VimFx is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # VimFx is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with VimFx. If not, see <http://www.gnu.org/licenses/>.
20 # This file creates VimFx’s status panel, similar to the “URL popup” shown when
21 # hovering or focusing links.
23 utils = require('./utils')
25 injectStatusPanel = (browser) ->
26 window = browser.ownerGlobal
28 statusPanel = window.document.createElement('statuspanel')
29 utils.setAttributes(statusPanel, {
35 window.gBrowser.getBrowserContainer(browser).appendChild(statusPanel)
36 module.onShutdown(-> statusPanel.remove())