aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/data/scripts/follow.js
diff options
context:
space:
mode:
authorGravatar Brendan Taylor <whateley@gmail.com>2010-10-11 12:24:33 -0600
committerGravatar Brendan Taylor <whateley@gmail.com>2010-10-11 12:24:33 -0600
commit667a68033ce72dd6b852954315f0457983f95b1b (patch)
treeb6be080e4f30ed492b0957f6a17040634f3a61e4 /examples/data/scripts/follow.js
parentda00b8c3c8b65b826b91d67d5ddbe5cc07c9ebdf (diff)
parent400b23552e7a4e8f1219c677dc491f35e22d335a (diff)
Merge remote branch 'mathstuf/dev/cleanup-scripts' into HEAD
Conflicts: (bashisms) examples/data/scripts/formfiller.sh examples/data/scripts/insert_bookmark.sh examples/data/scripts/instance-select-wmii.sh
Diffstat (limited to 'examples/data/scripts/follow.js')
-rw-r--r--examples/data/scripts/follow.js48
1 files changed, 24 insertions, 24 deletions
diff --git a/examples/data/scripts/follow.js b/examples/data/scripts/follow.js
index 77c40cd..eacd52f 100644
--- a/examples/data/scripts/follow.js
+++ b/examples/data/scripts/follow.js
@@ -202,38 +202,38 @@ function reDrawHints(elems, chars) {
// pass: number of keys
// returns: key length
function labelLength(n) {
- var oldn = n;
- var keylen = 0;
- if(n < 2) {
- return 1;
- }
- n -= 1; // our highest key will be n-1
- while(n) {
- keylen += 1;
- n = Math.floor(n / charset.length);
- }
- return keylen;
+ var oldn = n;
+ var keylen = 0;
+ if(n < 2) {
+ return 1;
+ }
+ n -= 1; // our highest key will be n-1
+ while(n) {
+ keylen += 1;
+ n = Math.floor(n / charset.length);
+ }
+ return keylen;
}
// pass: number
// returns: label
function intToLabel(n) {
- var label = '';
- do {
- label = charset.charAt(n % charset.length) + label;
- n = Math.floor(n / charset.length);
- } while(n);
- return label;
+ var label = '';
+ do {
+ label = charset.charAt(n % charset.length) + label;
+ n = Math.floor(n / charset.length);
+ } while(n);
+ return label;
}
// pass: label
// returns: number
function labelToInt(label) {
- var n = 0;
- var i;
- for(i = 0; i < label.length; ++i) {
- n *= charset.length;
- n += charset.indexOf(label[i]);
- }
- return n;
+ var n = 0;
+ var i;
+ for(i = 0; i < label.length; ++i) {
+ n *= charset.length;
+ n += charset.indexOf(label[i]);
+ }
+ return n;
}
//Put it all together
function followLinks(follow) {