From 895bd2fdbf7095beefa192fc58e854c43f904721 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Wed, 3 Sep 2008 00:18:11 +0000 Subject: [PATCH] Style: use local variable, use else if --- skins/common/wikibits.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 4dbf5ba756..9a5dc13fdc 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -606,17 +606,17 @@ function ts_resortTable(lnk) { } } - sortfn = ts_sort_caseinsensitive; + var sortfn = ts_sort_caseinsensitive; if (itm.match(/^\d\d[\/. -][a-zA-Z]{3}[\/. -]\d\d\d\d$/)) sortfn = ts_sort_date; - if (itm.match(/^\d\d[\/.-]\d\d[\/.-]\d\d\d\d$/)) + else if (itm.match(/^\d\d[\/.-]\d\d[\/.-]\d\d\d\d$/)) sortfn = ts_sort_date; - if (itm.match(/^\d\d[\/.-]\d\d[\/.-]\d\d$/)) + else if (itm.match(/^\d\d[\/.-]\d\d[\/.-]\d\d$/)) sortfn = ts_sort_date; // pound dollar euro yen currency cents - if (itm.match(/(^[\u00a3$\u20ac\u00a4\u00a5]|\u00a2$)/)) + else if (itm.match(/(^[\u00a3$\u20ac\u00a4\u00a5]|\u00a2$)/)) sortfn = ts_sort_currency; - if (itm.match(/^[\d.,eE+-]+\%?$/)) + else if (itm.match(/^[\d.,eE+-]+\%?$/)) sortfn = ts_sort_numeric; var reverse = (span.getAttribute("sortdir") == 'down'); -- 2.20.1