diff options
Diffstat (limited to 'pages/scores.php')
-rw-r--r-- | pages/scores.php | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/pages/scores.php b/pages/scores.php index 9443673..70acbaa 100644 --- a/pages/scores.php +++ b/pages/scores.php @@ -49,6 +49,12 @@ function start() { if (typeof(hashParts[1]) !== 'undefined') {
pointerMapID = hashParts[1];
}
+ if (typeof(hashParts[2]) !== 'undefined' && hashParts[2]-0 > 0) {
+ pointerPage = hashParts[2];
+ } else pointerPage = 1;
+ if (typeof(hashParts[3]) !== 'undefined') {
+ pointerUserID = hashParts[3];
+ }
//+1 because i'm gonna use prev.
pointerTime = new Date(dateSplit[0],dateSplit[1]-1,dateSplit[2]-0+1);
}
@@ -84,9 +90,10 @@ function displayMapScores(mapID) { $('#scoreDisplay').empty();
newDiv.prependTo('#scoreDisplay');
}
- scoresShowPage(1, mapID);
$("#mapDisplay").fadeOut('fast');
displayMap(mapID, "mapDisplay", 682);
+ scoresShowPage(pointerPage, mapID);
+ //console.log(pointerPage, mapID);
}
@@ -95,9 +102,21 @@ function updateHash() { tmp = tmp.split("#");
var anchorTag = tmp[0]+'#'+pointerDate;
anchorTag += "_"+pointerMapID;
+ if (pointerPage) anchorTag += "_"+pointerPage;
+ else anchorTag += "_";
+ if (pointerUserID) anchorTag += "_"+pointerUserID;
+ else anchorTag += "_";
document.location=anchorTag;
}
+var pointerPage = 1, pointerUserID
+function saveScoreLocation(page, userID) {
+ pointerPage = page;
+ pointerUserID = userID;
+ updateHash();
+ console.log("SaveScoreLoc");
+}
+
var pointerDate;
function getMapIDs(request) {
switch (request) {
|