()
| 2 | |
| 3 | // Extracts a dictionary of parameters from window.location.hash. |
| 4 | function getLocationHashParams() { |
| 5 | const paramStrings = window.location.hash.substr(1).split('&'); |
| 6 | const params = {}; |
| 7 | for (let ii = 0; ii < paramStrings.length; ii++) { |
| 8 | const keyValue = paramStrings[ii].split('='); |
| 9 | if (keyValue[0].length > 0) { |
| 10 | params[keyValue[0]] = keyValue[1] |
| 11 | ? decodeURIComponent(keyValue[1]) : undefined; |
| 12 | } |
| 13 | } |
| 14 | return params; |
| 15 | } |
| 16 | |
| 17 | // Removes given parameter from window.location.hash. |
| 18 | function removeParamFromLocationHashParams(param) { |
no outgoing calls
no test coverage detected