Skip to content

Commit

Permalink
πŸ΄β€β˜ οΈ
Browse files Browse the repository at this point in the history
  • Loading branch information
Anemy authored Dec 5, 2019
1 parent 7ff71e0 commit 367a3ca
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions treasure.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ function getUrlParam(parameter, defaultvalue) {
return urlparameter;
}

var seed = getUrlParam('seed', Math.floor(Math.random() * 10000000));
var seed = getUrlParam('seed');
if (!seed) {
seed = Math.floor(Math.random() * 10000000);
} else {
document.title = 'Treasure - ' + seed;
}
var newPageTitle = 'Treasure - ' + seed;
history.pushState({
seed: seed
Expand Down Expand Up @@ -289,8 +294,8 @@ function touchStarted() {
seed = Math.floor(Math.random() * 10000000);
Math.seedrandom(String(seed));

document.title = newPageTitle;
var newPageTitle = 'Treasure - ' + seed;
document.title = newPageTitle;
history.pushState({
seed: seed
}, newPageTitle, '?seed=' + seed);
Expand Down

0 comments on commit 367a3ca

Please sign in to comment.