Some of our urls on the pages are still in http and we cannot get this correct at the server side. Is there some javascript code to rewrite all urls with http:// to // or https://?
EDIT:
By testing with the anwser of T.J. Crowder I got all the "a href" to be replaced.
However I had a lot of different places with urls of images like:
<header class="category_header init_bg_mobile" data-bg="//test.jpg" data-bg-md="http://test2.jpg" data-bg-xs-2x="http://test.jpg" >
So I made a mix of his anwser and This anwser.
<script>
(function(){
Array.prototype.forEach.call(
document.body.innerHTML = document.body.innerHTML.replace('http://', '//');
)();
</script>
This does the trick for now.
A side note, I don't think this is good practice since it changes every single place "http://" is on the page, which can also rewrite it if it is intented in the text. However it does the trick for now.