From b0ee83660895c0adb4fe6554c6fc0a50c6d28d31 Mon Sep 17 00:00:00 2001 From: techsideofficial Date: Wed, 22 Nov 2023 14:10:47 +1300 Subject: [PATCH] owwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww --- percentages/indiv/index.html | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/percentages/indiv/index.html b/percentages/indiv/index.html index d31c4f2..e6dc06b 100644 --- a/percentages/indiv/index.html +++ b/percentages/indiv/index.html @@ -14,26 +14,13 @@ } async function getText() { - let myObject = await fetch("https://us-central1-joysteem.cloudfunctions.net/getrwprog?query=" + getUrlParameter('level')); + let searchParams = new URLSearchParams(window.location.search) + let myObject = await fetch("https://us-central1-joysteem.cloudfunctions.net/getrwprog?query=" + searchParams.get('level')); let myText = await myObject.text(); SetImage(myText); } - var getUrlParameter = function getUrlParameter(sParam) { - var sPageURL = window.location.search.substring(1), - sURLVariables = sPageURL.split('&'), - sParameterName, - i; - for (i = 0; i < sURLVariables.length; i++) { - sParameterName = sURLVariables[i].split('='); - - if (sParameterName[0] === sParam) { - return sParameterName[1] === undefined ? true : decodeURIComponent(sParameterName[1]); - } - } - return false; - };