website/playground/urlHash.js/read
export function read() {
  const hash = document.location.hash.slice(1);
  if (!hash) {
    return {};
  }

  // backwards support for old json encoded URIComponent
  const decode = hash.includes("%7B%22")
    ? decodeURIComponent
    : LZString.decompressFromEncodedURIComponent;

  try {
    return JSON.parse(decode(hash));
  } catch {
    return {};
  }
}