mirror of
https://github.com/pi-hole/web.git
synced 2025-12-20 10:48:26 +00:00
parseQueryString: switch to URLSearchParams and remove unused param
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
@@ -530,16 +530,9 @@ function getCSSval(cssclass, cssproperty) {
|
||||
return val;
|
||||
}
|
||||
|
||||
function parseQueryString(queryString = globalThis.location.search) {
|
||||
const GETDict = {};
|
||||
queryString
|
||||
.substr(1)
|
||||
.split("&")
|
||||
.forEach(function (item) {
|
||||
GETDict[item.split("=")[0]] = decodeURIComponent(item.split("=")[1]);
|
||||
});
|
||||
|
||||
return GETDict;
|
||||
function parseQueryString() {
|
||||
const params = new URLSearchParams(globalThis.location.search);
|
||||
return Object.fromEntries(params.entries());
|
||||
}
|
||||
|
||||
// https://stackoverflow.com/q/21647928
|
||||
|
||||
Reference in New Issue
Block a user