How can I get the URL parameters of the current page? This is for a userscript that I want to redirect the user to a different url if current url parameter equals a predefined parameter. I want the script to loop between 3 set pages.
The urls look like this: example.com/pages?car=1
I have no idea whatsoever how to do this, but this is somewhat how
if(url is ?car=1){
wait 5 seconds;
redirect to ?car=2;
}elseif(url is ?car=2){
wait 5 seconds;
redirect to ?car=3;
}elseif(url is ?car=3){
wait 5 seconds;
redirect to ?car=1;
}