Expire saved changeset comment older than 2 days

(closes #3947)
This commit is contained in:
Bryan Housel
2017-04-21 23:01:32 -04:00
parent 92d6d51724
commit a5554cf3b0
2 changed files with 19 additions and 4 deletions
+7 -2
View File
@@ -75,8 +75,13 @@ export function behaviorHash(context) {
if (window.location.hash) {
var q = utilStringQs(window.location.hash.substring(1));
if (q.id) context.zoomToEntity(q.id.split(',')[0], !q.map);
if (q.comment) context.storage('comment', q.comment);
if (q.id) {
context.zoomToEntity(q.id.split(',')[0], !q.map);
}
if (q.comment) {
context.storage('comment', q.comment);
context.storage('commentDate', Date.now());
}
hashchange();
if (q.map) hash.hadHash = true;
}