To point 11. It is maybe modern JS but there is URL object for these things for some time, no need for regexping
You have all the parameters in URL searchParams object
const params = new URL(window.location.href).searchParams
You can just spread it into entries
[...params] or [...params.entries()]
or if you want to have object so much (even it makes not much sense here, since you can have valid params string with multiple same parameter with different values and then you will loose them except last one, since object cannot have multiple same keys...)
Object.fromEntries([...params])
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
To point 11. It is maybe modern JS but there is URL object for these things for some time, no need for regexping
You have all the parameters in URL searchParams object
const params = new URL(window.location.href).searchParams
You can just spread it into entries
[...params] or [...params.entries()]
or if you want to have object so much (even it makes not much sense here, since you can have valid params string with multiple same parameter with different values and then you will loose them except last one, since object cannot have multiple same keys...)
Object.fromEntries([...params])