Add hashtags API parameter and localStorage

(closes #2834)
This commit is contained in:
Bryan Housel
2017-08-16 10:47:17 -04:00
parent 4cf357f61a
commit a42aa789e9
3 changed files with 46 additions and 29 deletions
+7 -1
View File
@@ -37,7 +37,9 @@ export function behaviorHash(context) {
var center = map.center(),
zoom = map.zoom(),
precision = Math.max(0, Math.ceil(Math.log(zoom) / Math.LN2)),
q = _.omit(utilStringQs(window.location.hash.substring(1)), ['comment', 'walkthrough']),
q = _.omit(utilStringQs(window.location.hash.substring(1)),
['comment', 'hashtags', 'walkthrough']
),
newParams = {};
delete q.id;
@@ -99,6 +101,10 @@ export function behaviorHash(context) {
context.storage('commentDate', Date.now());
}
if (q.hashtags) {
context.storage('hashtags', q.hashtags);
}
if (q.walkthrough === 'true') {
hash.startWalkthrough = true;
}