https redirect: use location.replace(...) instead of location.href = ...

Currently, when redirecting from http to https, there will be two
entries added in the browser history.
Pressing "back" will go back to "http", and YoutubeCenter, in return,
will redirect to "https" again, effectively causing an infinite loop.

use location.replace() instead, because that does not create another
history entry in the browser and the back button works as expected.