From cfd438545c5929e1c28c02d84b1e7da7b8a92746 Mon Sep 17 00:00:00 2001 From: drry Date: Sun, 30 Nov 2008 22:17:10 +0000 Subject: * fixed a regex. * et cetera. git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@25492 d0d07461-0603-4401-acd4-de1884942a52 --- toggler.js | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) (limited to 'toggler.js') diff --git a/toggler.js b/toggler.js index 4d7f8a7..8757de4 100644 --- a/toggler.js +++ b/toggler.js @@ -1,4 +1,4 @@ -/* +/** * ==VimperatorPlugin== * @name toggler * @version 0.1 @@ -40,22 +40,21 @@ function Toggler(name, cmds){ } Toggler.prototype = { next: function(notUpdate){ - let index = this.index + 1; + var index = this.index + 1; if (index >= this.cmds.length) index = 0; if (!notUpdate) this.index = index; return this.cmds[index]; }, previous: function(notUpdate){ - let index = this.index - 1; + var index = this.index - 1; if (index < 0) index = this.cmds.length -1; if (!notUpdate) this.index = index; return this.cmds[this.index]; }, list: function(){ - var data = []; - for (var i = 0; i