diff options
Diffstat (limited to 'pages/scores.php')
-rw-r--r-- | pages/scores.php | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/pages/scores.php b/pages/scores.php index f995e62..933873c 100644 --- a/pages/scores.php +++ b/pages/scores.php @@ -99,7 +99,7 @@ var pointerDate; function getMapIDs(request) {
switch (request) {
case "next":
- if (pointerTime.getTime() + (24*60*60*1000) > serverTime.getTime()) {
+ if (pointerTime.getTime() > serverTime.getTime()) {
alert("Tomorrow hasn't happened yet. Alerts are bad. - TMP!");
return;
}
@@ -170,14 +170,17 @@ function addMapToNav(mapID) { $("#mapNavigation").append($newdiv1);
+ //var URLString = 'map/'+mapID+'.js';
+ var URLString = 'map/'+mapID;
+
$.ajax({
type: "GET",
- url: 'map/'+mapID,
+ url: URLString,
cache: true,
data: '',
fail: function() { alert("error"); },
complete: function(data) {
- $("#thumb_"+mapID).html(mapThumbnailHTML(decryptJSON(data.responseText), 100)).show('slow');
+ $("#thumb_"+mapID).html(mapThumbnailHTML(decryptJSON(data.responseText), 120)).show();
}
});
mapsInNav.push(mapID);
@@ -200,7 +203,7 @@ var Tile = {"Wall" : "w", "SinglePath" : "o"};
function mapThumbnailHTML(map, targetWidth) {
- if (!targetWidth) targetWidth = 100;
+ if (!targetWidth) targetWidth = 120;
var scale = map.width / targetWidth;
var width = parseInt(map.width / scale);
@@ -208,15 +211,17 @@ function mapThumbnailHTML(map, targetWidth) { var tileWidth = parseInt(width / map.width);
width = tileWidth * map.width;
+ height = tileWidth * map.height;
var mapgrid = '';
var mapClass = '';
var toolTip = 'Inactive map';
- var mapDate = new Date(map.dateExpires + " PST");
+ var mapDate = new Date(map.dateExpires*1000);
+ console.log("Dates: ", map.ID, mapDate, serverTime);
if (mapDate.getTime() > serverTime.getTime()) {
mapClass = ' current';
- toolTip = 'Active map';
+ toolTip = 'This map can still be played.';
}
var r = '';
|