aboutsummaryrefslogtreecommitdiffstats
path: root/statusline-toolbar.js
diff options
context:
space:
mode:
authorteramako2011-03-26 08:32:56 +0900
committerteramako2011-03-26 08:32:56 +0900
commit98677e765e876ff2df78aef4154c7be9b00d8139 (patch)
tree33dd62b0101dbd173028ba042d93f2ac284216ad /statusline-toolbar.js
parent09bcd433e13dfed44bab1388d4adb11be79debf5 (diff)
downloadvimperator-plugins-98677e765e876ff2df78aef4154c7be9b00d8139.tar.bz2
refactoring
Diffstat (limited to 'statusline-toolbar.js')
-rw-r--r--statusline-toolbar.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/statusline-toolbar.js b/statusline-toolbar.js
index 3293041..1796f2c 100644
--- a/statusline-toolbar.js
+++ b/statusline-toolbar.js
@@ -51,6 +51,7 @@ function createElement (name, attrs) {
return elm;
}
+var gToolbox = gNavToolbox;
var id = "liberator-customize-toolbar";
if (!$(id)) {
init();
@@ -96,7 +97,7 @@ function init () {
removeSets.splice(i, 1);
continue;
}
- let elm = document.getElementById(id);
+ let elm = $(id);
if (elm) {
if (elm.parentNode !== t) {
t.appendChild(elm);
@@ -104,7 +105,7 @@ function init () {
updater[id][0](elm);
}
newSets.push(id);
- } else if (gNavToolbox.palette.querySelector("#" + id)) {
+ } else if (gToolbox.palette.querySelector("#" + id)) {
newSets.push(id);
}
}
@@ -115,7 +116,7 @@ function init () {
return val;
},
completer: function (context) {
- context.completions = [["none","-"]].concat(Array.map(gNavToolbox.palette.children, function(elm) {
+ context.completions = [["none","-"]].concat(Array.map(gToolbox.palette.children, function(elm) {
return [ elm.id, elm.getAttribute("label") || "-" ];
}));
},
@@ -132,7 +133,7 @@ function updateSets (toolbar, newSets, removeSets) {
}
}
for (let [, id] in Iterator(removeSets)) {
- let elm = document.getElementById(id);
+ let elm = $(id);
if (!elm)
continue;