Used first code snippets from ClearURLs v2: https://gitlab.com/ClearURLs/core/-/blob/master/src/utils/URLHashParams.ts