Skip to content

Instantly share code, notes, and snippets.

@littlefolk
Created May 7, 2011 09:01
Show Gist options
  • Save littlefolk/960341 to your computer and use it in GitHub Desktop.
Save littlefolk/960341 to your computer and use it in GitHub Desktop.
vimperator plugin patch: refcontrol.js
diff --git refcontrol.js refcontrol.js
index 54261b3..7c36ab6 100644
--- refcontrol.js
+++ refcontrol.js
@@ -98,8 +98,8 @@ RefControl.prototype = {
panel.setAttribute('class', 'statusbarpanel-iconic');
panel.setAttribute('src', self.isEnable ? ENABLE_ICON : DISABLE_ICON);
panel.addEventListener('click', function(e) { self.isEnable = !self.isEnable; }, false);
- document.getElementById('status-bar').insertBefore(
- panel, document.getElementById('security-button').nextSibling);
+ var statusbar = document.getElementById('status-bar');
+ statusbar.insertBefore(panel, statusbar.firstChild);
return panel;
},
get isEnable() _isEnable,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment