bring back hash functions

master
Andrew Dolgov 4 years ago
parent b6c3dde1cc
commit 5475eed452

@ -70,20 +70,13 @@ require(["dojo/_base/kernel",
/* exported hash_get */
function hash_get(key) {
console.warn("FIXME: hash_get", key);
//const kv = window.location.hash.substring(1).toQueryParams();
//return kv[key];
console.warn("FIXME: hash_get", key);
const obj = dojo.queryToObject(window.location.hash.substring(1));
return obj[key];
}
/* exported hash_set */
function hash_set(key, value) {
console.warn("FIXME: hash_set", key, value);
/*const kv = window.location.hash.substring(1).toQueryParams();
kv[key] = value;
window.location.hash = $H(kv).toQueryString();*/
console.warn("FIXME: hash_set", key);
const obj = dojo.queryToObject(window.location.hash.substring(1));
obj[key] = value;
window.location.hash = dojo.objectToQuery(obj);
}

Loading…
Cancel
Save