#7 Make URL query viewer tool (#9)

Closes #7

Reviewed-on: #9
Co-authored-by: stuzer05 <stuzer05@stuzer.link>
Co-committed-by: stuzer05 <stuzer05@stuzer.link>
This commit is contained in:
Illya Marchenko 2024-03-12 19:53:56 +02:00 committed by Illya Marchenko
parent 66474e3791
commit cd7c5a7c82
Signed by: Gitea
GPG Key ID: 81CE9C258E973E3A

View File

@ -56,16 +56,11 @@ export default {
return;
}
const urlParams = new URLSearchParams(this.toolData.data);
const url = new URL(this.toolData.data);
// Parse query
const queryParams = [];
for (let [key, value] of urlParams) {
// Fix first param starts with main url part
if (key.indexOf('?') !== -1) {
key = key.split('?')[1];
}
for (let [key, value] of url.searchParams.entries()) {
queryParams.push({
key: key,
value: value,