Complete web purchase from message (bug 1101995)

@muffinresearch r?

I've only tested with a dummy html page but it should work with your patch!
I think this will work the same as location e.g. you could also use just `a.origin` when available or fallback to the `a.protocol + '//' +  a.host` as that should be enough to deal with the port.