summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/scores.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/js/scores.js b/js/scores.js
index 34d3c87..0e81213 100644
--- a/js/scores.js
+++ b/js/scores.js
@@ -110,21 +110,22 @@ function scoresPreparePage (mapid, page) {
var scoresShowNavSideBtns = false;
function scoresFormatPage(JO) {
+ var solutionsGiven = !JO.isCurrentMap;
+
var p = "<table class='score'>";
//console.log("jo object", JO);
var navi = '';
+ var naviColSpan = 3;
+ if (solutionsGiven) naviColSpan++;
if (JO.pageCount > 1) {
- navi = "<tr><th class='unselectable' colspan='4' style='text-align:center;'>"+formatPageNavi(JO, "scoresShowPage", JO.mapid)+"</th></tr>";
+ navi = "<tr><th class='unselectable' colspan='"+naviColSpan+"' style='text-align:center;'>"+formatPageNavi(JO, "scoresShowPage", JO.mapid)+"</th></tr>";
p = p+navi;
}
var localTime = new Date();
var updatedLocalTime = new Date();
updatedLocalTime.setTime(JO.updateTime * 1000);
-
- //Hack to determine if solutions are given
- var solutionsGiven = (JO.users && JO.users[1] && JO.users[1].solution);
-
+
p = p+"<tr title='Last-Update: "+updatedLocalTime.format("mmm d, h:MM TT")+"'>";
p = p+"<th>Rank</th>";
p = p+"<th style='width:125px; overflow:hidden; text-align:left; padding-left:42px;'>Name</th>";