diff --git a/OHTV/base.js b/OHTV/base.js index e01f5e4..3d26311 100644 --- a/OHTV/base.js +++ b/OHTV/base.js @@ -54,17 +54,19 @@ function menuInit() { menuSelect(0); } -function menuSelect(i) { - if (i<=0) { - i = 0; - } else if (i>=opts.length) { - i = opts.length-1; +// TODO(sunglim): Rename variable name. Perhaps, index?. +function menuSelect(index) { + // TODO(sunglim): ASSET(i >= 0 || opts.length < opts.length); + if (index <=0) { + index = 0; + } else if (index>=opts.length) { + index = opts.length-1; } - selected = i; + selected = index; var scroll = Math.max(0, Math.min(opts.length-13, selected-6)); - for (i=0; i=scroll && i=scroll && index