(params)
| 23 | |
| 24 | // Sets window.location hash based on a dictionary of parameters. |
| 25 | function setLocationHashParams(params) { |
| 26 | const out = []; |
| 27 | for (const key in params) { |
| 28 | if (params.hasOwnProperty(key)) { |
| 29 | out.push(key + '=' + encodeURIComponent(params[key])); |
| 30 | } |
| 31 | } |
| 32 | window.location.hash = out.join('&'); |
| 33 | } |
| 34 | |
| 35 | // Base64 encoded ascii to ucs-2 string. |
| 36 | function atou(str) { |
no test coverage detected