]> git.gir.st - VimFx.git/blob - extension/lib/status-panel.coffee
Enable the `colon_assignment_spacing` CoffeeLint rule
[VimFx.git] / extension / lib / status-panel.coffee
1 ###
2 # Copyright Simon Lydell 2015.
3 #
4 # This file is part of VimFx.
5 #
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.
10 #
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.
15 #
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/>.
18 ###
19
20 # This file creates VimFx’s status panel, similar to the “URL popup” shown when
21 # hovering or focusing links.
22
23 utils = require('./utils')
24
25 injectStatusPanel = (browser) ->
26 window = browser.ownerGlobal
27
28 statusPanel = window.document.createElement('statuspanel')
29 utils.setAttributes(statusPanel, {
30 inactive: 'true'
31 layer: 'true'
32 mirror: 'true'
33 })
34 statusPanel.style.pointerEvents = 'auto'
35
36 window.gBrowser.getBrowserContainer(browser).appendChild(statusPanel)
37 module.onShutdown(-> statusPanel.remove())
38
39 return statusPanel
40
41 module.exports = {
42 injectStatusPanel
43 }
Imprint / Impressum