I am new to javascript and kinda noobish… my first code will be an url-manipulator…
I want to do the following: I want a url like
http://www.example.com/index.php?show=vods&play=1234
to be manipulated so a "&res=480p" will be added everytime I browse a site with "?show=vods&play=XXXX" where X is between 0 and 9 …
Example:
http://www.example.com/index.php?show=vods&play=1234 [original url]
-->
http://www.example.com/index.php?show=vods&play=1234&res=480p [manipulated url]
I know, I am at beginner-level, so please can someone gimme a hint, solve my problem or can give me something to read so I can solve it on my own?
You can change url in javascript using window.location.href
something like this:
window.location.href = window.location.href + ‘&res=480p’