Fixed grabbing the correct manga on random

Fixed issues with grabbing the correct manga when browsing a random
manga using /random. By grabbing the manga link in a different way from
using window.location.pathname.