aboutsummaryrefslogtreecommitdiffstats
path: root/statusbar_panel.js
diff options
context:
space:
mode:
authoranekos2013-04-06 18:18:33 +0900
committeranekos2013-04-06 18:18:33 +0900
commit862198772d1b50822d888bae4d13d3ee8aa69740 (patch)
tree889e25a74d4a88d7e77a5a23de0e40e41e448e8c /statusbar_panel.js
parentd26934599d3df506f21e1ead94483d4e351b703c (diff)
downloadvimperator-plugins-862198772d1b50822d888bae4d13d3ee8aa69740.tar.bz2
ミョクス
Diffstat (limited to 'statusbar_panel.js')
-rw-r--r--statusbar_panel.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/statusbar_panel.js b/statusbar_panel.js
index 156fd7f..fe2a52b 100644
--- a/statusbar_panel.js
+++ b/statusbar_panel.js
@@ -52,15 +52,14 @@ function getImages(panel) {
}
function makeIcon(panel) {
- var icon = <image xmlns={XUL.uri}/>;
+ var icon = xml`<image xmlns=${XUL.uri}/>`;
var image = getImages(panel)[0];
if (image) {
let style = window.getComputedStyle(image, null);
let src = image.src || style.listStyleImage.replace(/^url\("(.+)"\)$/, '$1');
if (src != '') {
- icon.@style = 'list-style-image: url("' + src + '");' +
- '-moz-image-region: ' + style.MozImageRegion;
+ icon.setAttribute('style','list-style-image: url("' + src + '");' + '-moz-image-region: ' + style.MozImageRegion);
}
}
return icon;
@@ -140,7 +139,7 @@ commands.addUserCommand(['statusbarpanel'],'click statusbar panel',
context.keys = { text: 'text', description: 'desc', icon: 'icon' };
context.compare = CompletionContext.Sort.unsorted;
context.process = [function (item, text) {
- return `<span highlight="CompIcon">{item.icon ? item.icon : ``}</span><span class="td-strut"/>{text}`
+ return xml`<span highlight="CompIcon">{item.icon ? item.icon : ``}</span><span class="td-strut"/>{text}`
}];
var list = generateStatusbarpaneIDlList(arg);