xmlHttpRequest changes the baseURI

Hello! I’m engaged in writing the Wikipedia reader. I had to stop when after implementing the “Random page” because I noticed that it only works once.

Codepen

I couldn’t make it work with jQuery’s $getJSON. After looking and searching around I decided to use xmlHttpRequest, but it came with the nasty surprise of turning my site into a single-use site :tired_face:

I really like the progress I’ve made thus far but this was unexpected and very disrupting for an otherwise nice viewer.

Edit: Wait a second… I’ll try using span instead of a for the side menu.

Edit2: Well, it works as I wanted now. I am not sure if this is “hiding bad code under the carpet” or not. We’ll know when the search function gets implemented I guess.